@@ -14,23 +14,25 @@ import (
14
14
)
15
15
16
16
var (
17
- branchPrefix string
18
- branchSuffix string
19
- branchRegex string
20
- selectLabel string
21
- selectLabels []string
22
- addLabels []string
23
- addAssignees []string
24
- requireCI bool
25
- mustBeApproved bool
26
- autoclose bool
27
- updateBranch bool
28
- ignoreLabel string
29
- ignoreLabels []string
30
- reposFile string
31
- minimum int
32
- defaultOwner string
33
- baseBranch string
17
+ branchPrefix string
18
+ branchSuffix string
19
+ branchRegex string
20
+ selectLabel string
21
+ selectLabels []string
22
+ addLabels []string
23
+ addAssignees []string
24
+ requireCI bool
25
+ mustBeApproved bool
26
+ autoclose bool
27
+ updateBranch bool
28
+ ignoreLabel string
29
+ ignoreLabels []string
30
+ reposFile string
31
+ minimum int
32
+ defaultOwner string
33
+ baseBranch string
34
+ combineBranchName string
35
+ workingBranchSuffix string
34
36
)
35
37
36
38
// NewRootCmd creates the root command for the gh-combine CLI
@@ -81,9 +83,11 @@ func NewRootCmd() *cobra.Command {
81
83
gh combine octocat/hello-world --add-assignees octocat,hubot # Assign users to the new PR
82
84
83
85
# Additional options
84
- gh combine octocat/hello-world --autoclose # Close source PRs when combined PR is merged
85
- gh combine octocat/hello-world --base-branch main # Use a different base branch for the combined PR
86
- gh combine octocat/hello-world --update-branch # Update the branch of the combined PR` ,
86
+ gh combine octocat/hello-world --autoclose # Close source PRs when combined PR is merged
87
+ gh combine octocat/hello-world --base-branch main # Use a different base branch for the combined PR
88
+ gh combine octocat/hello-world --combine-branch-name combined-prs # Use a different name for the combined PR branch
89
+ gh combine octocat/hello-world --working-branch-suffix -working # Use a different suffix for the working branch
90
+ gh combine octocat/hello-world --update-branch # Update the branch of the combined PR` ,
87
91
RunE : runCombine ,
88
92
}
89
93
@@ -110,6 +114,8 @@ func NewRootCmd() *cobra.Command {
110
114
rootCmd .Flags ().BoolVar (& autoclose , "autoclose" , false , "Close source PRs when combined PR is merged" )
111
115
rootCmd .Flags ().BoolVar (& updateBranch , "update-branch" , false , "Update the branch of the combined PR if possible" )
112
116
rootCmd .Flags ().StringVar (& baseBranch , "base-branch" , "main" , "Base branch for the combined PR (default: main)" )
117
+ rootCmd .Flags ().StringVar (& combineBranchName , "combine-branch-name" , "combined-prs" , "Name of the combined PR branch" )
118
+ rootCmd .Flags ().StringVar (& workingBranchSuffix , "working-branch-suffix" , "-working" , "Suffix of the working branch" )
113
119
rootCmd .Flags ().StringVar (& reposFile , "file" , "" , "File containing repository names, one per line" )
114
120
rootCmd .Flags ().IntVar (& minimum , "minimum" , 2 , "Minimum number of PRs to combine" )
115
121
rootCmd .Flags ().StringVar (& defaultOwner , "owner" , "" , "Default owner for repositories (if not specified in repo name or missing from file inputs)" )
0 commit comments