mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
misc/dashboard/codereview: de-dup LGTMs.
R=golang-dev, r CC=golang-dev https://golang.org/cl/6127066
This commit is contained in:
parent
c3c8e35af2
commit
83aa040c45
1 changed files with 5 additions and 2 deletions
|
|
@ -304,6 +304,7 @@ func updateCL(c appengine.Context, n string) error {
|
|||
if i := strings.Index(cl.FirstLine, "\n"); i >= 0 {
|
||||
cl.FirstLine = cl.FirstLine[:i]
|
||||
}
|
||||
lgtm := make(map[string]bool)
|
||||
rcpt := make(map[string]bool)
|
||||
for _, msg := range apiResp.Messages {
|
||||
s, rev := msg.Sender, false
|
||||
|
|
@ -320,14 +321,16 @@ func updateCL(c appengine.Context, n string) error {
|
|||
}
|
||||
|
||||
if msg.Approval {
|
||||
// TODO(dsymonds): De-dupe LGTMs.
|
||||
cl.LGTMs = append(cl.LGTMs, s)
|
||||
lgtm[s] = true
|
||||
}
|
||||
|
||||
for _, r := range msg.Recipients {
|
||||
rcpt[r] = true
|
||||
}
|
||||
}
|
||||
for l := range lgtm {
|
||||
cl.LGTMs = append(cl.LGTMs, l)
|
||||
}
|
||||
for r := range rcpt {
|
||||
cl.Recipients = append(cl.Recipients, r)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue