From 97d24ee1c9d3850caddcbe818a2298d1e07dbe0f Mon Sep 17 00:00:00 2001 From: qwerty287 <80460567+qwerty287@users.noreply.github.com> Date: Wed, 8 Jan 2025 17:40:53 +0200 Subject: [PATCH] Remove deprecated API field (#4676) --- cmd/server/openapi/docs.go | 4 ---- server/api/repo.go | 3 --- server/model/repo.go | 1 - 3 files changed, 8 deletions(-) diff --git a/cmd/server/openapi/docs.go b/cmd/server/openapi/docs.go index 5452b9747..074fafbab 100644 --- a/cmd/server/openapi/docs.go +++ b/cmd/server/openapi/docs.go @@ -5144,10 +5144,6 @@ const docTemplate = `{ "config_file": { "type": "string" }, - "gated": { - "description": "TODO: deprecated in favor of RequireApproval =\u003e Remove in next major release", - "type": "boolean" - }, "netrc_trusted": { "type": "array", "items": { diff --git a/server/api/repo.go b/server/api/repo.go index b1cd17833..c9127c219 100644 --- a/server/api/repo.go +++ b/server/api/repo.go @@ -258,9 +258,6 @@ func PatchRepo(c *gin.Context) { c.String(http.StatusBadRequest, "Invalid require-approval setting") return } - } else if in.IsGated != nil { - c.String(http.StatusBadRequest, "'gated' option has been removed, use 'require-approval' in >= 3.0") - return } if in.Timeout != nil { repo.Timeout = *in.Timeout diff --git a/server/model/repo.go b/server/model/repo.go index 9adf87c26..e61646216 100644 --- a/server/model/repo.go +++ b/server/model/repo.go @@ -128,7 +128,6 @@ func (r *Repo) Update(from *Repo) { // RepoPatch represents a repository patch object. type RepoPatch struct { Config *string `json:"config_file,omitempty"` - IsGated *bool `json:"gated,omitempty"` // TODO: deprecated in favor of RequireApproval => Remove in next major release RequireApproval *string `json:"require_approval,omitempty"` Timeout *int64 `json:"timeout,omitempty"` Visibility *string `json:"visibility,omitempty"`