diff options
| author | Russ Cox <rsc@golang.org> | 2015-02-11 14:16:45 -0500 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2015-02-12 15:55:02 +0000 |
| commit | aeda9e8dd037ca116e6055b82264e55cf83b4dbe (patch) | |
| tree | 082e82418f8689f4875be87975b54e32603cb635 /git-codereview | |
| parent | 4343dcafaee32a85932cb983b80a12ac5809990a (diff) | |
| download | go-x-review-aeda9e8dd037ca116e6055b82264e55cf83b4dbe.tar.xz | |
git-codereview: hide +0 scores and +0 labels except Code-Review
Otherwise the list of reviewers is repeated for every label.
This is happening now that we have trybot labels.
Change-Id: Ie1fe0369d5944319c67fc9182ff3afbfd366687c
Reviewed-on: https://go-review.googlesource.com/4570
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Andrew Gerrand <adg@golang.org>
Diffstat (limited to 'git-codereview')
| -rw-r--r-- | git-codereview/pending.go | 7 | ||||
| -rw-r--r-- | git-codereview/pending_test.go | 14 |
2 files changed, 20 insertions, 1 deletions
diff --git a/git-codereview/pending.go b/git-codereview/pending.go index deda834..94b395c 100644 --- a/git-codereview/pending.go +++ b/git-codereview/pending.go @@ -292,10 +292,15 @@ func cmdPending(args []string) { maxValue = x.Value } } + // Unless there are scores to report, do not show labels other than Code-Review. + // This hides Run-TryBot and TryBot-Result. + if minValue >= 0 && maxValue <= 0 && name != "Code-Review" { + continue + } fmt.Fprintf(&buf, "\t%s:\n", name) for score := maxValue; score >= minValue; score-- { who := byScore[score] - if len(who) == 0 { + if len(who) == 0 || score == 0 && name != "Code-Review" { continue } sort.Strings(who) diff --git a/git-codereview/pending_test.go b/git-codereview/pending_test.go index a52cdb8..f43dd36 100644 --- a/git-codereview/pending_test.go +++ b/git-codereview/pending_test.go @@ -426,9 +426,23 @@ func testPendingReply(srv *gerritServer, id, rev, status string) { } ] }, + "Trybot-Spam": { + "all": [ + { + "_account_id": 42, + "name": "The Owner", + "value": 0 + } + ] + }, "Other-Label": { "all": [ { + "_id": 43, + "name": "George Opher", + "value": 0 + }, + { "_account_id": 42, "name": "The Owner", "value": 2 |
