Backport #26599 by @yardenshoham We now include the branch filler in the response. - Closes #26591 Signed-off-by: Yarden Shoham <git@yardenshoham.com> Co-authored-by: Yarden Shoham <git@yardenshoham.com>
This commit is contained in:
parent
4aed0e6b07
commit
fe78aabc67
3 changed files with 6 additions and 0 deletions
|
@ -19,6 +19,7 @@ var ErrInvalidReceiveHook = errors.New("Invalid JSON payload received over webho
|
||||||
type Hook struct {
|
type Hook struct {
|
||||||
ID int64 `json:"id"`
|
ID int64 `json:"id"`
|
||||||
Type string `json:"type"`
|
Type string `json:"type"`
|
||||||
|
BranchFilter string `json:"branch_filter"`
|
||||||
URL string `json:"-"`
|
URL string `json:"-"`
|
||||||
Config map[string]string `json:"config"`
|
Config map[string]string `json:"config"`
|
||||||
Events []string `json:"events"`
|
Events []string `json:"events"`
|
||||||
|
|
|
@ -260,5 +260,6 @@ func ToHook(repoLink string, w *webhook_model.Webhook) (*api.Hook, error) {
|
||||||
AuthorizationHeader: authorizationHeader,
|
AuthorizationHeader: authorizationHeader,
|
||||||
Updated: w.UpdatedUnix.AsTime(),
|
Updated: w.UpdatedUnix.AsTime(),
|
||||||
Created: w.CreatedUnix.AsTime(),
|
Created: w.CreatedUnix.AsTime(),
|
||||||
|
BranchFilter: w.BranchFilter,
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
4
templates/swagger/v1_json.tmpl
generated
4
templates/swagger/v1_json.tmpl
generated
|
@ -18910,6 +18910,10 @@
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"x-go-name": "AuthorizationHeader"
|
"x-go-name": "AuthorizationHeader"
|
||||||
},
|
},
|
||||||
|
"branch_filter": {
|
||||||
|
"type": "string",
|
||||||
|
"x-go-name": "BranchFilter"
|
||||||
|
},
|
||||||
"config": {
|
"config": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"additionalProperties": {
|
"additionalProperties": {
|
||||||
|
|
Loading…
Reference in a new issue