Skip to content

Commit 83baf59

Browse files
committed
feat: set project to be not required
1 parent 6332644 commit 83baf59

File tree

3 files changed

+15
-26
lines changed

3 files changed

+15
-26
lines changed

pkg/cmd/build.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,6 @@ var buildsList = cli.Command{
215215
&requestflag.Flag[string]{
216216
Name: "project",
217217
Usage: "Project name",
218-
Required: true,
219218
QueryPath: "project",
220219
},
221220
&requestflag.Flag[string]{
@@ -266,7 +265,6 @@ var buildsCompare = requestflag.WithInnerFlags(cli.Command{
266265
&requestflag.Flag[string]{
267266
Name: "project",
268267
Usage: "Project name",
269-
Required: true,
270268
BodyPath: "project",
271269
},
272270
&requestflag.Flag[[]string]{

pkg/cmd/project.go

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,7 @@ var projectsRetrieve = cli.Command{
6262
Suggest: true,
6363
Flags: []cli.Flag{
6464
&requestflag.Flag[string]{
65-
Name: "project",
66-
Required: true,
65+
Name: "project",
6766
},
6867
},
6968
Before: before,
@@ -77,8 +76,7 @@ var projectsUpdate = cli.Command{
7776
Suggest: true,
7877
Flags: []cli.Flag{
7978
&requestflag.Flag[string]{
80-
Name: "project",
81-
Required: true,
79+
Name: "project",
8280
},
8381
&requestflag.Flag[string]{
8482
Name: "display-name",
@@ -103,9 +101,9 @@ var projectsList = cli.Command{
103101
&requestflag.Flag[float64]{
104102
Name: "limit",
105103
Usage: "Maximum number of projects to return, defaults to 10 (maximum: 100).",
106-
Default: 10,
104+
Default: 10,
107105
DefaultText: "10",
108-
QueryPath: "limit",
106+
QueryPath: "limit",
109107
},
110108
&requestflag.Flag[string]{
111109
Name: "org",
@@ -123,8 +121,7 @@ var projectsGenerateCommitMessage = cli.Command{
123121
Suggest: true,
124122
Flags: []cli.Flag{
125123
&requestflag.Flag[string]{
126-
Name: "project",
127-
Required: true,
124+
Name: "project",
128125
},
129126
&requestflag.Flag[string]{
130127
Name: "target",

pkg/cmd/projectbranch.go

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ var projectsBranchesCreate = cli.Command{
2121
Suggest: true,
2222
Flags: []cli.Flag{
2323
&requestflag.Flag[string]{
24-
Name: "project",
25-
Required: true,
24+
Name: "project",
2625
},
2726
&requestflag.Flag[string]{
2827
Name: "branch",
@@ -54,8 +53,7 @@ var projectsBranchesRetrieve = cli.Command{
5453
Suggest: true,
5554
Flags: []cli.Flag{
5655
&requestflag.Flag[string]{
57-
Name: "project",
58-
Required: true,
56+
Name: "project",
5957
},
6058
&requestflag.Flag[string]{
6159
Name: "branch",
@@ -73,8 +71,7 @@ var projectsBranchesList = cli.Command{
7371
Suggest: true,
7472
Flags: []cli.Flag{
7573
&requestflag.Flag[string]{
76-
Name: "project",
77-
Required: true,
74+
Name: "project",
7875
},
7976
&requestflag.Flag[string]{
8077
Name: "cursor",
@@ -84,9 +81,9 @@ var projectsBranchesList = cli.Command{
8481
&requestflag.Flag[float64]{
8582
Name: "limit",
8683
Usage: "Maximum number of items to return, defaults to 10 (maximum: 100).",
87-
Default: 10,
84+
Default: 10,
8885
DefaultText: "10",
89-
QueryPath: "limit",
86+
QueryPath: "limit",
9087
},
9188
},
9289
Before: before,
@@ -100,8 +97,7 @@ var projectsBranchesDelete = cli.Command{
10097
Suggest: true,
10198
Flags: []cli.Flag{
10299
&requestflag.Flag[string]{
103-
Name: "project",
104-
Required: true,
100+
Name: "project",
105101
},
106102
&requestflag.Flag[string]{
107103
Name: "branch",
@@ -119,8 +115,7 @@ var projectsBranchesRebase = cli.Command{
119115
Suggest: true,
120116
Flags: []cli.Flag{
121117
&requestflag.Flag[string]{
122-
Name: "project",
123-
Required: true,
118+
Name: "project",
124119
},
125120
&requestflag.Flag[string]{
126121
Name: "branch",
@@ -129,9 +124,9 @@ var projectsBranchesRebase = cli.Command{
129124
&requestflag.Flag[string]{
130125
Name: "base",
131126
Usage: `The branch or commit SHA to rebase onto. Defaults to "main".`,
132-
Default: "main",
127+
Default: "main",
133128
DefaultText: "main",
134-
QueryPath: "base",
129+
QueryPath: "base",
135130
},
136131
},
137132
Before: before,
@@ -145,8 +140,7 @@ var projectsBranchesReset = cli.Command{
145140
Suggest: true,
146141
Flags: []cli.Flag{
147142
&requestflag.Flag[string]{
148-
Name: "project",
149-
Required: true,
143+
Name: "project",
150144
},
151145
&requestflag.Flag[string]{
152146
Name: "branch",

0 commit comments

Comments
 (0)