Skip to content
This repository was archived by the owner on Jun 1, 2022. It is now read-only.

Commit 9c2f2f4

Browse files
Fix help
1 parent acc04f5 commit 9c2f2f4

File tree

2 files changed

+35
-28
lines changed

2 files changed

+35
-28
lines changed

commands/issue/flag.go

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ type CreateUpdateOption struct {
1717
Edit bool `short:"e" long:"edit" description:"Edit the issue on editor. Start the editor with the contents in the given title and message options."`
1818
Title string `short:"i" long:"title" value-name:"<title>" description:"The title of an issue"`
1919
Message string `short:"m" long:"message" value-name:"<message>" description:"The message of an issue"`
20-
Template string `short:"p" long:"template" value-name:"<issue template>" description:"The template of an issue"`
20+
Template string `short:"p" long:"template" value-name:"<issue template>" description:"Start the editor with file using issue template"`
2121
StateEvent string `long:"state-event" value-name:"<state>" description:"Change the status. \"close\", \"reopen\""`
22-
AssigneeID int `long:"cu-assignee-id" value-name:"<assignee id>" description:"The ID of assignee."`
23-
MilestoneID int `long:"cu-milestone-id" value-name:"<milestone id>" description:"The ID of milestone."`
22+
AssigneeID int `long:"cu-assignee-id" value-name:"<assignee id>" description:"The ID of the user to assign the issue to."`
23+
MilestoneID int `long:"cu-milestone-id" value-name:"<milestone id>" description:"The global ID of a milestone to assign the issue to. "`
2424
}
2525

2626
func (o *CreateUpdateOption) hasEdit() bool {
@@ -57,9 +57,9 @@ type ListOption struct {
5757
OrderBy string `long:"orderby" value-name:"<orderby>" default:"updated_at" default-mask:"updated_at" description:"Print issue ordered by \"created_at\" or \"updated_at\" fields."`
5858
Sort string `long:"sort" value-name:"<sort>" default:"desc" default-mask:"desc" description:"Print issue ordered in \"asc\" or \"desc\" order."`
5959
Search string `short:"s" long:"search" value-name:"<search word>" description:"Search issues against their title and description."`
60-
Milestone string `long:"milestone" value-name:"<milestone>" description:"lists issues that have an assigned milestone."`
61-
AuthorID int `long:"author-id" value-name:"<auther id>" description:"lists issues that have an author id."`
62-
AssigneeID int `long:"assignee-id" value-name:"<assignee id>" description:"lists issues that have an assignee id."`
60+
Milestone string `long:"milestone" value-name:"<milestone>" description:"Print issues for a specific milestone. "`
61+
AuthorID int `long:"author-id" value-name:"<auther id>" description:"Print issues created by the given user id"`
62+
AssigneeID int `long:"assignee-id" value-name:"<assignee id>" description:"Print issues assigned to the given user id."`
6363
Opened bool `short:"o" long:"opened" description:"Shorthand of the state option for \"--state=opened\"."`
6464
Closed bool `short:"c" long:"closed" description:"Shorthand of the state option for \"--state=closed\"."`
6565
CreatedMe bool `short:"r" long:"created-me" description:"Shorthand of the scope option for \"--scope=created-by-me\"."`
@@ -102,24 +102,28 @@ func newOptionParser(opt *Option) *flags.Parser {
102102
opt.ShowOption = &ShowOption{}
103103
opt.BrowseOption = &BrowseOption{}
104104
parser := flags.NewParser(opt, flags.HelpFlag|flags.PassDoubleDash)
105-
parser.Usage = `issue - Create and Edit, list a issue
105+
parser.Usage = `issue - Create and Edit, List, Browse a issue
106106
107107
Synopsis:
108108
# List issue
109-
lab issue [-n <num>] [--state=<state> | -o | -c] [--scope=<scope> | -r | -a] [-s]
109+
lab issue [-n <num>] [--state=<state> | -o | -c] [--scope=<scope> | -r | -a] [-s <search word>]
110+
[--milestone=<milestone>] [--author-id=<author id>] [--assignee-id=<assignee id>]
110111
[--orderby=<orderby>] [--sort=<sort>] [-A]
111112
112113
# Create issue
113-
lab issue [-e] [-i <title>] [-m <message>] [--assignee-id=<assignee id>]
114+
lab issue -e | -i <title> [-m <message>]
115+
[--cu-assignee-id=<assignee id>] [--cu-milestone-id=<milestone id>]
114116
115117
# Update issue
116-
lab issue <issue iid> [-e] [-i <title>] [-m <message>] [--state-event=<state>] [--assignee-id=<assignee id>]
118+
lab issue <issue id> [-e] [-i <title>] [-m <message>]
119+
[--state-event=<state>]
120+
[--cu-assignee-id=<assignee id>] [--cu-milestone-id=<milestone id>]
117121
118122
# Show issue
119-
lab issue <issue iid> [--no-comment]
120-
123+
lab issue <issue id> [--no-comment]
124+
121125
# Browse issue
122-
lab issue -b [<issue iid>]`
126+
lab issue -b [<issue id>]`
123127

124128
return parser
125129
}

commands/mr/flag.go

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ type CreateUpdateOption struct {
1717
Edit bool `short:"e" long:"edit" description:"Edit the merge request on editor. Start the editor with the contents in the given title and message options."`
1818
Title string `short:"i" long:"title" value-name:"<title>" description:"The title of an merge request"`
1919
Message string `short:"m" long:"message" value-name:"<message>" description:"The message of an merge request"`
20-
Template string `short:"p" long:"template" value-name:"<merge request template>" description:"The template of an merge request"`
20+
Template string `short:"p" long:"template" value-name:"<merge request template>" description:"Start the editor with file using merge request template"`
2121
SourceBranch string `long:"source" value-name:"<source branch>" description:"The source branch"`
2222
TargetBranch string `long:"target" value-name:"<target branch>" default:"master" default-mask:"master" description:"The target branch"`
2323
StateEvent string `long:"state-event" value-name:"<state>" description:"Change the status. \"opened\", \"closed\""`
24-
AssigneeID int `long:"cu-assignee-id" value-name:"<assignee id>" description:"The ID of assignee."`
25-
MilestoneID int `long:"cu-milestone-id" value-name:"<milestone id>" description:"The ID of milestone."`
24+
AssigneeID int `long:"cu-assignee-id" value-name:"<assignee id>" description:"The ID of the user to assign the merge request to."`
25+
MilestoneID int `long:"cu-milestone-id" value-name:"<milestone id>" description:"The global ID of a milestone to assign the merge request to. "`
2626
}
2727

2828
func (o *CreateUpdateOption) hasEdit() bool {
@@ -59,9 +59,9 @@ type ListOption struct {
5959
OrderBy string `long:"orderby" value-name:"<orderby>" default:"updated_at" default-mask:"updated_at" description:"Print merge request ordered by \"created_at\" or \"updated_at\" fields."`
6060
Sort string `long:"sort" value-name:"<sort>" default:"desc" default-mask:"desc" description:"Print merge request ordered in \"asc\" or \"desc\" order."`
6161
Search string `short:"s" long:"search" value-name:"<search word>" description:"Search merge request against their title and description."`
62-
Milestone string `long:"milestone" value-name:"<milestone>" description:"lists merge request that have an assigned milestone."`
63-
AuthorID int `long:"author-id" value-name:"<auther id>" description:"lists merge request that have an author id."`
64-
AssigneeID int `long:"assignee-id" value-name:"<assignee id>" description:"lists merge request that have an assignee id."`
62+
Milestone string `long:"milestone" value-name:"<milestone>" description:"Print merge requests for a specific milestone. "`
63+
AuthorID int `long:"author-id" value-name:"<auther id>" description:"Print merge requests created by the given user id"`
64+
AssigneeID int `long:"assignee-id" value-name:"<assignee id>" description:"Print merge requests assigned to the given user id."`
6565
Opened bool `short:"o" long:"opened" description:"Shorthand of the state option for \"--state=opened\"."`
6666
Closed bool `short:"c" long:"closed" description:"Shorthand of the state option for \"--state=closed\"."`
6767
Merged bool `short:"g" long:"merged" description:"Shorthand of the state option for \"--state=merged\"."`
@@ -107,25 +107,28 @@ func newOptionParser(opt *Option) *flags.Parser {
107107
opt.ListOption = &ListOption{}
108108
opt.BrowseOption = &BrowseOption{}
109109
parser := flags.NewParser(opt, flags.HelpFlag|flags.PassDoubleDash)
110-
parser.Usage = `merge-request - Create and Edit, list a merge request
110+
parser.Usage = `merge-request - Create and Edit, List, Browse a merge request
111111
112112
Synopsis:
113113
# List merge request
114-
lab merge-request [-n <num>] -l [--state <state>] [--scope <scope>]
115-
[--orderby <orderby>] [--sort <sort>] -o -c -g
116-
-r -a -A
114+
lab merge-request [-n <num>] [--state=<state> | -o | -c] [--scope=<scope> | -r | -a] [-s <search word>]
115+
[--milestone=<milestone>] [--author-id=<author id>] [--assignee-id=<assignee id>]
116+
[--orderby <orderby>] [--sort <sort>] [-A]
117117
118118
# Create merge request
119-
lab merge-request [-e] [-i <title>] [-d <message>] [--assignee-id=<assignee id>]
119+
lab merge-request -e | -i <title> [-m <message>]
120+
[--cu-assignee-id=<assignee id>] [--cu-milestone-id=<milestone id>]
120121
121122
# Update merge request
122-
lab merge-request <merge request iid> [-t <title>] [-d <description>] [--state-event=<state>] [--assignee-id=<assignee id>]
123+
lab merge-request <merge request id> [-e] [-i <title>] [-m <message>]
124+
[--state-event=<state>]
125+
[--cu-assignee-id=<assignee id>] [--cu-milestone-id=<milestone id>]
123126
124127
# Show merge request
125-
lab merge-request <mergerequest iid>
126-
128+
lab merge-request <merge request id> [--no-comment]
129+
127130
# Browse merge request
128-
lab merge-request -b [<mergerequest iid>]`
131+
lab merge-request -b [<merge request id>]`
129132

130133
return parser
131134
}

0 commit comments

Comments
 (0)