forgejo-hooks: RemoveBranch event
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
parent
af3d65e451
commit
c7a5740ee5
1 changed files with 15 additions and 0 deletions
|
@ -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),
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue