diff options
Diffstat (limited to 'misc/dashboard/codereview')
-rw-r--r-- | misc/dashboard/codereview/dashboard/cl.go | 18 | ||||
-rw-r--r-- | misc/dashboard/codereview/dashboard/people.go | 19 |
2 files changed, 34 insertions, 3 deletions
diff --git a/misc/dashboard/codereview/dashboard/cl.go b/misc/dashboard/codereview/dashboard/cl.go index e150ea123..0ef3303e9 100644 --- a/misc/dashboard/codereview/dashboard/cl.go +++ b/misc/dashboard/codereview/dashboard/cl.go @@ -178,8 +178,14 @@ func handleAssign(w http.ResponseWriter, r *http.Request) { return } defer resp.Body.Close() + body, err := ioutil.ReadAll(resp.Body) + if err != nil { + c.Errorf("Failed reading body: %v", err) + http.Error(w, err.Error(), 500) + return + } if resp.StatusCode != 200 { - c.Errorf("Retrieving CL reviewer list failed: got HTTP response %d", resp.StatusCode) + c.Errorf("Retrieving CL reviewer list failed: got HTTP response %d\nBody: %s", resp.StatusCode, body) http.Error(w, "Failed contacting Rietveld", 500) return } @@ -187,7 +193,7 @@ func handleAssign(w http.ResponseWriter, r *http.Request) { var apiResp struct { Reviewers []string `json:"reviewers"` } - if err := json.NewDecoder(resp.Body).Decode(&apiResp); err != nil { + if err := json.Unmarshal(body, &apiResp); err != nil { // probably can't be retried msg := fmt.Sprintf("Malformed JSON from %v: %v", url, err) c.Errorf("%s", msg) @@ -212,8 +218,14 @@ func handleAssign(w http.ResponseWriter, r *http.Request) { return } defer resp.Body.Close() + body, err := ioutil.ReadAll(resp.Body) + if err != nil { + c.Errorf("Failed reading Gobot body: %v", err) + http.Error(w, err.Error(), 500) + return + } if resp.StatusCode != 200 { - c.Errorf("Gobot GET failed: got HTTP response %d", resp.StatusCode) + c.Errorf("Gobot GET failed: got HTTP response %d\nBody: %s", resp.StatusCode, body) http.Error(w, "Failed contacting Gobot", 500) return } diff --git a/misc/dashboard/codereview/dashboard/people.go b/misc/dashboard/codereview/dashboard/people.go index facda7baf..45de03b1e 100644 --- a/misc/dashboard/codereview/dashboard/people.go +++ b/misc/dashboard/codereview/dashboard/people.go @@ -21,6 +21,7 @@ func init() { // and prefer to use their golang.org address for code review. gophers := [...]string{ "adg", + "agl", "bradfitz", "campoy", "dsymonds", @@ -37,6 +38,24 @@ func init() { emailToPerson[p+"@google.com"] = p preferredEmail[p] = p + "@golang.org" } + // Other people. + others := map[string]string{ + "adonovan": "adonovan@google.com", + "brainman": "alex.brainman@gmail.com", + "ality": "ality@pbrane.org", + "dfc": "dave@cheney.net", + "dvyukov": "dvyukov@google.com", + "gustavo": "gustavo@niemeyer.net", + "jsing": "jsing@google.com", + "mikioh": "mikioh.mikioh@gmail.com", + "minux": "minux.ma@gmail.com", + "rminnich": "rminnich@gmail.com", + } + for p, e := range others { + personList = append(personList, p) + emailToPerson[e] = p + preferredEmail[p] = e + } sort.Strings(personList) } |