From a4cb8983350be634448d6cc327666d5db5ac70a0 Mon Sep 17 00:00:00 2001 From: forgejo-backport-action Date: Mon, 5 May 2025 15:25:50 +0000 Subject: [PATCH] [v11.0/forgejo] fix(api): document `is_system_webhook` field (#7786) **Backport:** https://codeberg.org/forgejo/forgejo/pulls/7784 - Document that `is_system_webhook` field is accepted for the `POST /admin/hooks` endpoint. Co-authored-by: Gusted Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7786 Co-authored-by: forgejo-backport-action Co-committed-by: forgejo-backport-action --- modules/structs/hook.go | 3 ++- templates/swagger/v1_json.tmpl | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/structs/hook.go b/modules/structs/hook.go index 1665dc4da6..28c2e00588 100644 --- a/modules/structs/hook.go +++ b/modules/structs/hook.go @@ -53,7 +53,8 @@ type CreateHookOption struct { BranchFilter string `json:"branch_filter" binding:"GlobPattern"` AuthorizationHeader string `json:"authorization_header"` // default: false - Active bool `json:"active"` + Active bool `json:"active"` + IsSystemWebhook bool `json:"is_system_webhook"` } // EditHookOption options when modify one hook diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl index a16deb61a8..9aa2195a0c 100644 --- a/templates/swagger/v1_json.tmpl +++ b/templates/swagger/v1_json.tmpl @@ -22178,6 +22178,10 @@ }, "x-go-name": "Events" }, + "is_system_webhook": { + "type": "boolean", + "x-go-name": "IsSystemWebhook" + }, "type": { "type": "string", "enum": [