1
1
// SPDX-License-Identifier: Apache-2.0
2
2
3
+ //nolint:dupl // ignore duplicate of update
3
4
package repo
4
5
5
6
import (
@@ -115,6 +116,12 @@ var CommandAdd = &cli.Command{
115
116
Usage : "type of base pipeline for the compiler to render" ,
116
117
Value : constants .PipelineTypeYAML ,
117
118
},
119
+ & cli.StringFlag {
120
+ EnvVars : []string {"VELA_APPROVE_BUILD" , "REPO_APPROVE_BUILD" },
121
+ Name : "approve-build" ,
122
+ Aliases : []string {"ab" , "approve-build-setting" },
123
+ Usage : "when to require admin approval to run builds from outside contributors (`fork-always`, `fork-no-write`, or `never`)" ,
124
+ },
118
125
119
126
// Output Flags
120
127
@@ -139,6 +146,8 @@ EXAMPLES:
139
146
$ {{.HelpName}} --org MyOrg --repo MyRepo --counter 90
140
147
6. Add a repository with a starlark pipeline file.
141
148
$ {{.HelpName}} --org MyOrg --repo MyRepo --pipeline-type starlark
149
+ 7. Add a repository with approve build setting set to fork-no-write.
150
+ $ {{.HelpName}} --org MyOrg --repo MyRepo --approve-build fork-no-write
142
151
143
152
DOCUMENTATION:
144
153
@@ -182,6 +191,7 @@ func add(c *cli.Context) error {
182
191
Active : c .Bool ("active" ),
183
192
Events : c .StringSlice ("event" ),
184
193
PipelineType : c .String ("pipeline-type" ),
194
+ ApproveBuild : c .String ("approve-build" ),
185
195
Output : c .String (internal .FlagOutput ),
186
196
}
187
197
0 commit comments