Remove deprecated API field (#4676)

This commit is contained in:
qwerty287 2025-01-08 17:40:53 +02:00 committed by GitHub
parent 0f46ddceb9
commit 97d24ee1c9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 0 additions and 8 deletions

View file

@ -5144,10 +5144,6 @@ const docTemplate = `{
"config_file": { "config_file": {
"type": "string" "type": "string"
}, },
"gated": {
"description": "TODO: deprecated in favor of RequireApproval =\u003e Remove in next major release",
"type": "boolean"
},
"netrc_trusted": { "netrc_trusted": {
"type": "array", "type": "array",
"items": { "items": {

View file

@ -258,9 +258,6 @@ func PatchRepo(c *gin.Context) {
c.String(http.StatusBadRequest, "Invalid require-approval setting") c.String(http.StatusBadRequest, "Invalid require-approval setting")
return 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 { if in.Timeout != nil {
repo.Timeout = *in.Timeout repo.Timeout = *in.Timeout

View file

@ -128,7 +128,6 @@ func (r *Repo) Update(from *Repo) {
// RepoPatch represents a repository patch object. // RepoPatch represents a repository patch object.
type RepoPatch struct { type RepoPatch struct {
Config *string `json:"config_file,omitempty"` 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"` RequireApproval *string `json:"require_approval,omitempty"`
Timeout *int64 `json:"timeout,omitempty"` Timeout *int64 `json:"timeout,omitempty"`
Visibility *string `json:"visibility,omitempty"` Visibility *string `json:"visibility,omitempty"`