]> Cypherpunks repositories - gostls13.git/commitdiff
misc/dashboard/codereview: only accept "NOT LGTM" on the first line of a message.
authorDavid Symonds <dsymonds@golang.org>
Mon, 29 Oct 2012 11:03:58 +0000 (22:03 +1100)
committerDavid Symonds <dsymonds@golang.org>
Mon, 29 Oct 2012 11:03:58 +0000 (22:03 +1100)
Too many people quote entire emails and put their reply at the top ("top posting"),
so we shouldn't recognise review commands anywhere in the review text.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/6815048

misc/dashboard/codereview/dashboard/cl.go

index 4187ca6855baaaf87d64693291b780c3d2a3d600..dce2744257be06d82f5b99ec6bdd5507be0bf081 100644 (file)
@@ -389,7 +389,7 @@ func updateCL(c appengine.Context, n string) error {
                        lgtm[s] = true
                        delete(notLGTM, s) // "LGTM" overrules previous "NOT LGTM"
                }
-               if strings.Contains(msg.Text, "NOT LGTM") {
+               if strings.Contains(line, "NOT LGTM") {
                        notLGTM[s] = true
                        delete(lgtm, s) // "NOT LGTM" overrules previous "LGTM"
                }