Better example section in issue and pr create

This commit is contained in:
AliabbasMerchant 2020-06-14 21:53:56 +05:30
parent 4749e91c53
commit 84f3d46338
2 changed files with 13 additions and 18 deletions

View file

@ -61,13 +61,12 @@ var issueCreateCmd = &cobra.Command{
Use: "create",
Short: "Create a new issue",
RunE: issueCreate,
Example: `$ gh issue create
$ gh issue create -t "Issue With Title And Body" -b "This is the issue body"
$ gh issue create -t OpenAWebBrowserToCreateThisIssue --web
$ gh issue create -t IssueWithLabels -b IssueBody -l label1,label2
$ gh issue create -t IssueWithAssignees -b IssueBody -a user1Login,user2Login
$ gh issue create -t IssueWithProjects -b IssueBody -p cli/1,cli/2
$ gh issue create -t IssueWithMilestone -b IssueBody -m someMilestone
Example: `
$ gh issue create --title "I found a bug" --body "Nothing works"
$ gh issue create --label label1,label2
$ gh issue create --label label1 --label label2
$ gh issue create --assignee user1Login,user2Login
$ gh issue create --project "Our Awesome Project"
`,
}
var issueListCmd = &cobra.Command{

View file

@ -409,17 +409,13 @@ var prCreateCmd = &cobra.Command{
Use: "create",
Short: "Create a pull request",
RunE: prCreate,
Example: `$ gh pr create
$ gh pr create --fill
$ gh pr create -t "PR With Title And Body" -b "This is the pull request body"
$ gh pr create -t OpenAWebBrowserToCreateThisPR --web
$ gh pr create -t DraftPR --draft
$ gh pr create -t PRWithBaseBranch -b PRBody -B branchName
$ gh pr create -t PRWithReviewers -b PRBody -r user1Login,user2Login
$ gh pr create -t PRWithLabels -b PRBody -l label1,label2
$ gh pr create -t PRWithProjects -b PRBody -p cli/1,cli/2
$ gh pr create -t PRWithAssignees -b PRBody -a user1Login,user2Login
$ gh pr create -t PRWithMilestone -b PRBody -m someMilestone
Example: `
$ gh pr create --title "The bug is fixed" --body "Everything works again"
$ gh pr create --label label1,label2
$ gh pr create --label label1 --label label2
$ gh pr create --reviewer user1Login,user2Login
$ gh pr create --project "Our Awesome Project"
$ gh pr create --assignee user1Login,user2Login
`,
}