forgejo-hooks: RemoveBranch event

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
Maxime “pep” Buquet 2024-07-02 21:34:13 +02:00
parent af3d65e451
commit c7a5740ee5

View file

@ -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),
}