internal/gaby: show go review dashboard
Change-Id: Iadcc86299cd98ab60ee86f09f44cae0636422e06
Reviewed-on: https://go-review.googlesource.com/c/oscar/+/620115
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
diff --git a/internal/gaby/reviews.go b/internal/gaby/reviews.go
index 32875e9..9629715 100644
--- a/internal/gaby/reviews.go
+++ b/internal/gaby/reviews.go
@@ -7,10 +7,14 @@
import (
"net/http"
- "golang.org/x/oscar/internal/reviews"
+ "golang.org/x/oscar/internal/goreviews"
)
func (g *Gaby) handleReviewDashboard(w http.ResponseWriter, r *http.Request) {
- // TODO: pass change list and score predicates
- reviews.Display(g.slog, "", nil, w, r)
+ c := goreviews.New(g.slog, g.gerrit, g.gerritProjects)
+ if err := c.Sync(r.Context()); err != nil {
+ http.Error(w, err.Error(), http.StatusInternalServerError)
+ return
+ }
+ c.Display(w, r)
}