@@ -18,11 +18,12 @@ func getHotfixSubCommands() cli.Commands {
18
18
// gitlab-flow hotfix start @title @desc
19
19
func getHotfixStartSubCommand () * cli.Command {
20
20
return & cli.Command {
21
- Name : "start" ,
22
- Usage : "open a hotfix branch and merge request to master" ,
23
- ArgsUsage : "@title @desc" ,
24
- Description : "@title title \n \t @desc description" ,
25
- Category : "hotfix" ,
21
+ Name : "open" ,
22
+ Usage : "open @title @description" ,
23
+ ArgsUsage : "@title] [@description" ,
24
+ Description : "open a hotfix branch and merge request to master. " +
25
+ "\n @title title \n @desc description" ,
26
+ Category : "hotfix" ,
26
27
Action : func (c * cli.Context ) error {
27
28
log .
28
29
WithFields (log.Fields {"args" : c .Args ().Slice ()}).
@@ -33,11 +34,9 @@ func getHotfixStartSubCommand() *cli.Command {
33
34
if title == "" {
34
35
return errors .New ("title could not be empty" )
35
36
}
36
-
37
37
if desc == "" {
38
38
return errors .New ("desc could not be empty" )
39
39
}
40
-
41
40
confPath := c .String ("conf_path" )
42
41
debug := c .Bool ("debug" )
43
42
return getFlow (confPath , debug ).HotfixBegin (title , desc )
@@ -49,11 +48,20 @@ func getHotfixStartSubCommand() *cli.Command {
49
48
// gitlab-flow hotfix release @title @desc
50
49
func getHotfixFinishSubCommand () * cli.Command {
51
50
return & cli.Command {
52
- Name : "release " ,
53
- Usage : "finish a hotfix " ,
54
- ArgsUsage : "@branchName " ,
55
- Description : "@title title " ,
51
+ Name : "close " ,
52
+ Usage : "close [-hb, --hotfix_branch_name `hotfixBranchName`] " ,
53
+ ArgsUsage : "[-hb, --hotfix_branch_name `hotfixBranchName`] " ,
54
+ Description : "close a hotfix development, then create a merge request into master " ,
56
55
Category : "hotfix" ,
56
+ Flags : []cli.Flag {
57
+ & cli.StringFlag {
58
+ Name : "hotfix_branch_name" ,
59
+ Aliases : []string {"hb" },
60
+ Value : "" , // default current branch
61
+ Usage : "-hb, --hotfix_branch_name" , // be be overwritten
62
+ Required : false ,
63
+ },
64
+ },
57
65
Action : func (c * cli.Context ) error {
58
66
log .
59
67
WithFields (log.Fields {"args" : c .Args ().Slice ()}).
0 commit comments