feat(hook): add support for authorization_header in webhooks (#633)

fixes #632

Co-authored-by: Jörg Markert <venc0r@live.com>
Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/633
Reviewed-by: John Olheiser <john+gitea@jolheiser.com>
Co-authored-by: venc0r <venc0r@noreply.gitea.com>
Co-committed-by: venc0r <venc0r@noreply.gitea.com>
This commit is contained in:
venc0r 2023-09-26 00:01:48 +00:00 committed by techknowlogick
parent 0141b499c9
commit d5e174e5b5

View file

@ -100,6 +100,7 @@ type CreateHookOption struct {
Events []string `json:"events"` Events []string `json:"events"`
BranchFilter string `json:"branch_filter"` BranchFilter string `json:"branch_filter"`
Active bool `json:"active"` Active bool `json:"active"`
AuthorizationHeader string `json:"authorization_header"`
} }
// Validate the CreateHookOption struct // Validate the CreateHookOption struct
@ -147,6 +148,7 @@ type EditHookOption struct {
Events []string `json:"events"` Events []string `json:"events"`
BranchFilter string `json:"branch_filter"` BranchFilter string `json:"branch_filter"`
Active *bool `json:"active"` Active *bool `json:"active"`
AuthorizationHeader string `json:"authorization_header"`
} }
// EditOrgHook modify one hook of an organization, with hook id and options // EditOrgHook modify one hook of an organization, with hook id and options