1
0
mirror of https://codeberg.org/crowci/crow.git synced 2025-04-18 04:44:01 +03:00

chore: remove deprecated 'gated' references

This commit is contained in:
pat-s 2025-04-11 10:57:30 +01:00
parent 15aef2fbfc
commit 8cd171bd62
No known key found for this signature in database
GPG Key ID: 3C6318841EF78925
3 changed files with 1 additions and 11 deletions

View File

@ -64,7 +64,6 @@ Config path: {{ .Config }}
Visibility: {{ .Visibility }}
Private: {{ .IsSCMPrivate }}
Trusted: {{ .IsTrusted }}
Gated: {{ .IsGated }}
Require approval for: {{ .RequireApproval }}
Clone url: {{ .Clone }}
Allow pull-requests: {{ .AllowPullRequests }}

View File

@ -35,10 +35,6 @@ var repoUpdateCmd = &cli.Command{
Name: "trusted",
Usage: "repository is trusted",
},
&cli.BoolFlag{
Name: "gated", // TODO: remove in next release
Hidden: true,
},
&cli.StringFlag{
Name: "require-approval",
Usage: "repository requires approval for",
@ -102,11 +98,6 @@ func repoUpdate(ctx context.Context, c *cli.Command) error {
patch.IsTrusted = &trusted
}
// TODO: remove in next release
if c.IsSet("gated") {
return fmt.Errorf("'gated' option has been set in version 2.8, use 'require-approval' in >= 3.0")
}
if c.IsSet("require-approval") {
if mode := crow.ApprovalMode(requireApproval); mode.Valid() {
patch.RequireApproval = &mode

View File

@ -8,7 +8,7 @@ import (
"codeberg.org/crowci/crow/v3/server/model"
)
func TestSetGatedState(t *testing.T) {
func TestSetRequireApprovalState(t *testing.T) {
t.Parallel()
testCases := []struct {