Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1430)

Unified Diff: milo/appengine/backend/git/gitiles.go

Issue 2823413002: Milo buildbot: Add in the rest of the blame/commits information. (Closed)
Patch Set: Review Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « milo/api/resp/build.go ('k') | milo/appengine/buildbot/build.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: milo/appengine/backend/git/gitiles.go
diff --git a/milo/appengine/backend/git/gitiles.go b/milo/appengine/backend/git/gitiles.go
index cddd7749033f9b55c412561d6cd8e8c4d517b2f2..14ac81f0d95b7b853607c3644b4399c7ec8e1f7c 100644
--- a/milo/appengine/backend/git/gitiles.go
+++ b/milo/appengine/backend/git/gitiles.go
@@ -65,8 +65,8 @@ func fixURL(repoURL, treeish string) (string, error) {
if u.Scheme != "https" {
return "", fmt.Errorf("%s should start with https://", repoURL)
}
- if !strings.HasSuffix(u.Host, "googlesource.com") {
- return "", fmt.Errorf("Only googlesource.com repos supported")
+ if !strings.HasSuffix(u.Host, ".googlesource.com") {
+ return "", fmt.Errorf("Only .googlesource.com repos supported")
}
// Use the authenticated URL
u.Path = "a/" + u.Path
@@ -113,7 +113,10 @@ func GetCommits(c context.Context, repoURL, treeish string, limit int) ([]resp.C
AuthorName: log.Author.Name,
AuthorEmail: log.Author.Email,
Repo: repoURL,
- Revision: log.Commit,
+ Revision: &resp.Link{
+ Label: log.Commit,
+ URL: repoURL + "/+/" + log.Commit,
+ },
Description: log.Message,
Title: strings.SplitN(log.Message, "\n", 2)[0],
// TODO(hinoka): Fill in the rest of resp.Commit and add those details
« no previous file with comments | « milo/api/resp/build.go ('k') | milo/appengine/buildbot/build.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698