From 2a9478ed6446e2cbdef47d9dea1bd857c86631c1 Mon Sep 17 00:00:00 2001 From: David Symonds Date: Mon, 30 Jul 2012 14:41:04 +1000 Subject: [PATCH] misc/dashboard/codereview: pass user information to gobot when assigning reviewer. R=bradfitz CC=gobot, golang-dev, rsc https://golang.org/cl/6457052 --- misc/dashboard/codereview/dashboard/cl.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/misc/dashboard/codereview/dashboard/cl.go b/misc/dashboard/codereview/dashboard/cl.go index 8665947760a..181d2e40feb 100644 --- a/misc/dashboard/codereview/dashboard/cl.go +++ b/misc/dashboard/codereview/dashboard/cl.go @@ -128,7 +128,8 @@ func handleAssign(w http.ResponseWriter, r *http.Request) { } u := user.Current(c) - if _, ok := emailToPerson[u.Email]; !ok { + person, ok := emailToPerson[u.Email] + if !ok { http.Error(w, "Not allowed", http.StatusUnauthorized) return } @@ -183,7 +184,7 @@ func handleAssign(w http.ResponseWriter, r *http.Request) { if !found { c.Infof("Adding %v as a reviewer of CL %v", rev, n) - url := fmt.Sprintf("%s?cl=%s&r=%s", gobotBase, n, rev) + url := fmt.Sprintf("%s?cl=%s&r=%s&obo=%s", gobotBase, n, rev, person) resp, err := urlfetch.Client(c).Get(url) if err != nil { c.Errorf("Gobot GET failed: %v", err)