Skip to content

Commit

Permalink
Remove deprecated API field (woodpecker-ci#4676)
Browse files Browse the repository at this point in the history
  • Loading branch information
qwerty287 authored Jan 8, 2025
1 parent 0f46ddc commit 97d24ee
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 8 deletions.
4 changes: 0 additions & 4 deletions cmd/server/openapi/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
3 changes: 0 additions & 3 deletions server/api/repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion server/model/repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down

0 comments on commit 97d24ee

Please sign in to comment.