Merge pull request #278 from vilmibm/pr-status-info
Print repo and user context for status commands
This commit is contained in:
commit
526714cfd2
4 changed files with 16 additions and 2 deletions
|
|
@ -175,6 +175,10 @@ func issueStatus(cmd *cobra.Command, args []string) error {
|
|||
|
||||
out := colorableOut(cmd)
|
||||
|
||||
fmt.Fprintln(out, "")
|
||||
fmt.Fprintf(out, "Relevant issues in %s\n", ghrepo.FullName(baseRepo))
|
||||
fmt.Fprintln(out, "")
|
||||
|
||||
printHeader(out, "Issues assigned to you")
|
||||
if issuePayload.Assigned.TotalCount > 0 {
|
||||
printIssues(out, " ", issuePayload.Assigned.TotalCount, issuePayload.Assigned.Issues)
|
||||
|
|
|
|||
|
|
@ -58,7 +58,10 @@ func TestIssueStatus_blankSlate(t *testing.T) {
|
|||
t.Errorf("error running command `issue status`: %v", err)
|
||||
}
|
||||
|
||||
expectedOutput := `Issues assigned to you
|
||||
expectedOutput := `
|
||||
Relevant issues in OWNER/REPO
|
||||
|
||||
Issues assigned to you
|
||||
There are no issues assigned to you
|
||||
|
||||
Issues mentioning you
|
||||
|
|
|
|||
|
|
@ -104,6 +104,10 @@ func prStatus(cmd *cobra.Command, args []string) error {
|
|||
|
||||
out := colorableOut(cmd)
|
||||
|
||||
fmt.Fprintln(out, "")
|
||||
fmt.Fprintf(out, "Relevant pull requests in %s\n", ghrepo.FullName(baseRepo))
|
||||
fmt.Fprintln(out, "")
|
||||
|
||||
printHeader(out, "Current branch")
|
||||
if prPayload.CurrentPR != nil {
|
||||
printPrs(out, 0, *prPayload.CurrentPR)
|
||||
|
|
|
|||
|
|
@ -136,7 +136,10 @@ func TestPRStatus_blankSlate(t *testing.T) {
|
|||
t.Errorf("error running command `pr status`: %v", err)
|
||||
}
|
||||
|
||||
expected := `Current branch
|
||||
expected := `
|
||||
Relevant pull requests in OWNER/REPO
|
||||
|
||||
Current branch
|
||||
There is no pull request associated with [blueberries]
|
||||
|
||||
Created by you
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue