From 84f3d46338aa32597336d55e0ebcb13e85ea643f Mon Sep 17 00:00:00 2001 From: AliabbasMerchant Date: Sun, 14 Jun 2020 21:53:56 +0530 Subject: [PATCH] Better example section in issue and pr create --- command/issue.go | 13 ++++++------- command/pr_create.go | 18 +++++++----------- 2 files changed, 13 insertions(+), 18 deletions(-) diff --git a/command/issue.go b/command/issue.go index 3b7b9e9c9..3aa10c89a 100644 --- a/command/issue.go +++ b/command/issue.go @@ -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{ diff --git a/command/pr_create.go b/command/pr_create.go index e0fc3ca4e..0d0089b57 100644 --- a/command/pr_create.go +++ b/command/pr_create.go @@ -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 `, }