1
0
mirror of https://github.com/golang/go synced 2024-11-21 17:34:40 -07:00

misc/dashboard/codereview: pass user information to gobot when assigning reviewer.

R=bradfitz
CC=gobot, golang-dev, rsc
https://golang.org/cl/6457052
This commit is contained in:
David Symonds 2012-07-30 14:41:04 +10:00
parent 7711e61031
commit 2a9478ed64

View File

@ -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)