提交 6a4212b5 编写于 作者: S Sean Allred

Add option to show pull requests again

This change adds a long-form flag `--show-pulls` to `hub issue` that
directs hub to include pull requests in the issue listing.  The
default value is false; the default behavior does not change.

Temporary fix until a better abstraction for pull requests can be
designed.

Related: #1303
Related: vermiculus/magithub#44
上级 3d3facba
......@@ -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
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册