forked from hinterland/hearth
feat: vendor gitea 1.16.2
This commit is contained in:
@@ -19,6 +19,8 @@ var ErrInvalidReceiveHook = errors.New("Invalid JSON payload received over webho
|
||||
type Hook struct {
|
||||
// The unique identifier of the webhook
|
||||
ID int64 `json:"id"`
|
||||
// Optional human-readable name for the webhook
|
||||
Name string `json:"name"`
|
||||
// The type of the webhook (e.g., gitea, slack, discord)
|
||||
Type string `json:"type"`
|
||||
// Branch filter pattern to determine which branches trigger the webhook
|
||||
@@ -51,7 +53,7 @@ type CreateHookOptionConfig map[string]string
|
||||
// CreateHookOption options when create a hook
|
||||
type CreateHookOption struct {
|
||||
// required: true
|
||||
// enum: dingtalk,discord,gitea,gogs,msteams,slack,telegram,feishu,wechatwork,packagist
|
||||
// enum: ["dingtalk","discord","gitea","gogs","msteams","slack","telegram","feishu","wechatwork","packagist"]
|
||||
// The type of the webhook to create
|
||||
Type string `json:"type" binding:"Required"`
|
||||
// required: true
|
||||
@@ -66,6 +68,8 @@ type CreateHookOption struct {
|
||||
// default: false
|
||||
// Whether the webhook should be active upon creation
|
||||
Active bool `json:"active"`
|
||||
// Optional human-readable name for the webhook
|
||||
Name string `json:"name" binding:"MaxSize(255)"`
|
||||
}
|
||||
|
||||
// EditHookOption options when modify one hook
|
||||
@@ -80,6 +84,8 @@ type EditHookOption struct {
|
||||
AuthorizationHeader string `json:"authorization_header"`
|
||||
// Whether the webhook is active and will be triggered
|
||||
Active *bool `json:"active"`
|
||||
// Optional human-readable name
|
||||
Name *string `json:"name,omitzero" binding:"MaxSize(255)"`
|
||||
}
|
||||
|
||||
// Payloader payload is some part of one hook
|
||||
|
||||
Reference in New Issue
Block a user