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:
parent
15aef2fbfc
commit
8cd171bd62
@ -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 }}
|
||||
|
@ -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
|
||||
|
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user