commit 35a430051f9236d8acda2b38b1618e303e638f19
parent 9badc101ffe9980a1a91893f832ddb54b2f59d1a
Author: Russ Cox <rsc@golang.org>
Date: Fri, 15 May 2015 16:47:16 -0400
godash: show reviewer scores
Diffstat:
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/godash/main.go b/godash/main.go
@@ -55,6 +55,7 @@ type CL struct {
Project string
Author string
Reviewer string
+ ReviewerEmail string
NeedsReview bool
NeedsReviewChanged time.Time
Start time.Time
@@ -457,7 +458,11 @@ func (cl *CL) Status() string {
if rev == "" {
rev = "???"
}
- fmt.Fprintf(&buf, "%s → %s, %d/%d days, waiting for %s", cl.Author, rev, int(now.Sub(cl.NeedsReviewChanged).Seconds()/86400), int(now.Sub(cl.Start).Seconds()/86400), who)
+ score := ""
+ if x := cl.Scores[cl.ReviewerEmail]; x != 0 {
+ score = fmt.Sprintf("%+d", x)
+ }
+ fmt.Fprintf(&buf, "%s → %s%s, %d/%d days, waiting for %s", cl.Author, rev, score, int(now.Sub(cl.NeedsReviewChanged).Seconds()/86400), int(now.Sub(cl.Start).Seconds()/86400), who)
for _, id := range cl.Issues {
fmt.Fprintf(&buf, " #%d", id)
}