diff --git a/commands/issue.go b/commands/issue.go index ad3512e24..6e0db95f9 100644 --- a/commands/issue.go +++ b/commands/issue.go @@ -130,6 +130,9 @@ With no arguments, show a list of open issues. -^ --sort-ascending Sort by ascending dates instead of descending. + + --show-pulls + Show pull requests as well. `, } @@ -156,6 +159,7 @@ With no arguments, show a list of open issues. flagIssueCopy, flagIssueBrowse, flagIssueSortAscending bool + flagIssueShowPulls bool flagIssueMilestone uint64 @@ -183,6 +187,7 @@ func init() { cmdIssue.Flag.StringVarP(&flagIssueSince, "since", "d", "", "DATE") cmdIssue.Flag.StringVarP(&flagIssueSort, "sort", "o", "created", "SORT_KEY") cmdIssue.Flag.BoolVarP(&flagIssueSortAscending, "sort-ascending", "^", false, "SORT_KEY") + cmdIssue.Flag.BoolVarP(&flagIssueShowPulls, "show-pulls", "", false, "SHOW_PULLS") cmdIssue.Use(cmdCreateIssue) CmdRunner.Use(cmdIssue) @@ -240,7 +245,7 @@ func listIssues(cmd *Command, args *Args) { colorize := ui.IsTerminal(os.Stdout) for _, issue := range issues { - if issue.PullRequest != nil { + if !flagIssueShowPulls && issue.PullRequest != nil { continue }