[REFACTOR] webhook.Handler interface

This commit is contained in:
oliverpool 2024-03-20 15:44:01 +01:00
parent 142459bbe0
commit 702152bfde
35 changed files with 378 additions and 210 deletions

View file

@ -17,13 +17,17 @@ var ErrInvalidReceiveHook = errors.New("Invalid JSON payload received over webho
// Hook a hook is a web hook when one repository changed
type Hook struct {
ID int64 `json:"id"`
Type string `json:"type"`
BranchFilter string `json:"branch_filter"`
URL string `json:"-"`
ID int64 `json:"id"`
Type string `json:"type"`
BranchFilter string `json:"branch_filter"`
URL string `json:"url"`
// Deprecated: use Metadata instead
Config map[string]string `json:"config"`
Events []string `json:"events"`
AuthorizationHeader string `json:"authorization_header"`
ContentType string `json:"content_type"`
Metadata any `json:"metadata"`
Active bool `json:"active"`
// swagger:strfmt date-time
Updated time.Time `json:"updated_at"`