aboutsummaryrefslogtreecommitdiffstats
path: root/modules/structs/hook.go
diff options
context:
space:
mode:
authorYarden Shoham <git@yardenshoham.com>2023-08-21 14:43:52 +0300
committerGitHub <noreply@github.com>2023-08-21 11:43:52 +0000
commit16dee4f1b251eec933a6c32520dc0e285a3d6f42 (patch)
tree940bcd14ee2892b6e45fe6c0f601c6ab5c82336f /modules/structs/hook.go
parentfacdaee47b49f163e6927cc021eace18940ad441 (diff)
downloadgitea-16dee4f1b251eec933a6c32520dc0e285a3d6f42.tar.gz
gitea-16dee4f1b251eec933a6c32520dc0e285a3d6f42.zip
Add `branch_filter` to hooks API endpoints (#26599)
We now include the branch filler in the response. - Closes #26591 # Before ![image](https://github.com/go-gitea/gitea/assets/20454870/73933940-c1a7-4573-abae-f340b63028b2) # After ![image](https://github.com/go-gitea/gitea/assets/20454870/3b3c4a85-0f7c-48c7-8617-def7a66c671d) --------- Signed-off-by: Yarden Shoham <git@yardenshoham.com> Co-authored-by: Giteabot <teabot@gitea.io>
Diffstat (limited to 'modules/structs/hook.go')
-rw-r--r--modules/structs/hook.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/structs/hook.go b/modules/structs/hook.go
index cd91d4bc46..0babe84410 100644
--- a/modules/structs/hook.go
+++ b/modules/structs/hook.go
@@ -19,6 +19,7 @@ var ErrInvalidReceiveHook = errors.New("Invalid JSON payload received over webho
type Hook struct {
ID int64 `json:"id"`
Type string `json:"type"`
+ BranchFilter string `json:"branch_filter"`
URL string `json:"-"`
Config map[string]string `json:"config"`
Events []string `json:"events"`