diff --git a/command/issue.go b/command/issue.go index e64d8d806..0ad1c8d45 100644 --- a/command/issue.go +++ b/command/issue.go @@ -13,14 +13,14 @@ func init() { RootCmd.AddCommand(issueCmd) issueCmd.AddCommand( &cobra.Command{ - Use: "list", - Short: "List issues", + Use: "status", + Short: "Show status of relevant issues", RunE: issueList, }, &cobra.Command{ - Use: "view issue-number", + Use: "view ", Args: cobra.MinimumNArgs(1), - Short: "Open a issue in the browser", + Short: "Open an issue in the browser", RunE: issueView, }, ) @@ -29,11 +29,7 @@ func init() { var issueCmd = &cobra.Command{ Use: "issue", Short: "Work with GitHub issues", - Long: `This command allows you to work with issues.`, - Args: cobra.MinimumNArgs(1), - RunE: func(cmd *cobra.Command, args []string) error { - return fmt.Errorf("%+v is not a valid issue command", args) - }, + Long: `Helps you work with issues.`, } func issueList(cmd *cobra.Command, args []string) error { diff --git a/command/issue_test.go b/command/issue_test.go index 69312cac7..d796c1819 100644 --- a/command/issue_test.go +++ b/command/issue_test.go @@ -16,9 +16,9 @@ func TestIssueList(t *testing.T) { defer jsonFile.Close() http.StubResponse(200, jsonFile) - output, err := test.RunCommand(RootCmd, "issue list") + output, err := test.RunCommand(RootCmd, "issue status") if err != nil { - t.Errorf("error running command `issue list`: %v", err) + t.Errorf("error running command `issue status`: %v", err) } expectedIssues := []*regexp.Regexp{ diff --git a/command/pr.go b/command/pr.go index 182522f29..720405da8 100644 --- a/command/pr.go +++ b/command/pr.go @@ -18,7 +18,7 @@ func init() { RunE: prList, }, &cobra.Command{ - Use: "view [pr-number]", + Use: "view []", Short: "Open a pull request in the browser", RunE: prView, },