From c7a5740ee53c83a0d32b04312e3433b36b4f409a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20=E2=80=9Cpep=E2=80=9D=20Buquet?= Date: Tue, 2 Jul 2024 21:34:13 +0200 Subject: [PATCH] forgejo-hooks: RemoveBranch event MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maxime “pep” Buquet --- forgejo-hooks/src/lib.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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), }