From b506c3e17aad13ec64ff24d86ec034259bd224d1 Mon Sep 17 00:00:00 2001 From: David Symonds Date: Mon, 29 Oct 2012 22:03:58 +1100 Subject: [PATCH] misc/dashboard/codereview: only accept "NOT LGTM" on the first line of a message. 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/dashboard/codereview/dashboard/cl.go b/misc/dashboard/codereview/dashboard/cl.go index 4187ca6855..dce2744257 100644 --- a/misc/dashboard/codereview/dashboard/cl.go +++ b/misc/dashboard/codereview/dashboard/cl.go @@ -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" } -- 2.48.1