diff --git a/forgejo-hooks/src/lib.rs b/forgejo-hooks/src/lib.rs index 0ae2de7..2367dc3 100644 --- a/forgejo-hooks/src/lib.rs +++ b/forgejo-hooks/src/lib.rs @@ -156,6 +156,11 @@ pub struct Push { pub sender: User, } +#[derive(Deserialize, Debug)] +pub enum RefType { + Branch, +} + #[derive(Deserialize, Debug)] pub struct AddedBranch { pub sha: String, @@ -164,9 +169,19 @@ pub struct AddedBranch { pub sender: RepositoryOwner, } +#[derive(Deserialize, Debug)] +pub struct RemovedBranch { + pub sha: String, + pub ref_type: String, + pub pusher_type: String, + pub repository: Repository, + pub sender: RepositoryOwner, +} + #[derive(Deserialize, Debug)] #[serde(untagged)] pub enum Hook { Push(Push), AddedBranch(AddedBranch), + RemovedBranch(RemovedBranch), }