Skip to content

Instantly share code, notes, and snippets.

@tianon
Created November 18, 2014 22:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tianon/76ab3d70430905626d98 to your computer and use it in GitHub Desktop.
Save tianon/76ab3d70430905626d98 to your computer and use it in GitHub Desktop.
diff --git a/display.go b/display.go
index fc52fcd..1aefc3a 100644
--- a/display.go
+++ b/display.go
@@ -34,7 +34,7 @@ func truncate(s string) string {
func DisplayPullRequests(c *cli.Context, pulls []*gh.PullRequest, notrunc bool) {
w := newTabwriter()
- fmt.Fprintf(w, "NUMBER\tSHA\tLAST UPDATED\tCONTRIBUTOR\tASSIGNEE\tTITLE")
+ fmt.Fprintf(w, "URL\tLAST UPDATED\tCONTRIBUTOR\tTITLE")
if c.Bool("lgtm") {
fmt.Fprintf(w, "\tLGTM")
}
@@ -43,11 +43,7 @@ func DisplayPullRequests(c *cli.Context, pulls []*gh.PullRequest, notrunc bool)
if !notrunc {
p.Title = truncate(p.Title)
}
- var assignee string
- if p.Assignee != nil {
- assignee = p.Assignee.Login
- }
- fmt.Fprintf(w, "%d\t%s\t%s\t%s\t%s\t%s", p.Number, p.Head.Sha[:8], HumanDuration(time.Since(p.UpdatedAt)), p.User.Login, assignee, p.Title)
+ fmt.Fprintf(w, "%s\t%s\t%s\t%s", p.HTMLURL, HumanDuration(time.Since(p.UpdatedAt)), p.User.Login, p.Title)
if c.Bool("lgtm") {
lgtm := strconv.Itoa(p.ReviewComments)
if p.ReviewComments >= 2 {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment