loading up the forgejo repo on tangled to test page performance
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Yarden Shoham
Giteabot
and committed by
GitHub
16dee4f1 facdaee4

+6
+1
modules/structs/hook.go
··· 19 19 type Hook struct { 20 20 ID int64 `json:"id"` 21 21 Type string `json:"type"` 22 + BranchFilter string `json:"branch_filter"` 22 23 URL string `json:"-"` 23 24 Config map[string]string `json:"config"` 24 25 Events []string `json:"events"`
+1
services/webhook/general.go
··· 260 260 AuthorizationHeader: authorizationHeader, 261 261 Updated: w.UpdatedUnix.AsTime(), 262 262 Created: w.CreatedUnix.AsTime(), 263 + BranchFilter: w.BranchFilter, 263 264 }, nil 264 265 }
+4
templates/swagger/v1_json.tmpl
··· 19137 19137 "type": "string", 19138 19138 "x-go-name": "AuthorizationHeader" 19139 19139 }, 19140 + "branch_filter": { 19141 + "type": "string", 19142 + "x-go-name": "BranchFilter" 19143 + }, 19140 19144 "config": { 19141 19145 "type": "object", 19142 19146 "additionalProperties": {