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

Unified Diff: milo/buildsource/buildbot/build.go

Issue 2968333003: Milo: Create build summaries for buildbot in the pubsub pipeline (Closed)
Patch Set: fix Created 3 years, 5 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 | « no previous file | milo/buildsource/buildbot/pubsub.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: milo/buildsource/buildbot/build.go
diff --git a/milo/buildsource/buildbot/build.go b/milo/buildsource/buildbot/build.go
index 63dfb6741e7f3765f04eca5480e4fca801657343..85c13a585ebd575dac94c1bb230c91fe95aea2f5 100644
--- a/milo/buildsource/buildbot/build.go
+++ b/milo/buildsource/buildbot/build.go
@@ -388,17 +388,19 @@ func properties(b *buildbotBuild) (result []*resp.PropertyGroup) {
// blame extracts the commit and blame information from a buildbot build and
// returns it as a list of Commits.
func blame(b *buildbotBuild) (result []*resp.Commit) {
- for _, c := range b.Sourcestamp.Changes {
- files := c.GetFiles()
- result = append(result, &resp.Commit{
- AuthorEmail: c.Who,
- Repo: c.Repository,
- CommitTime: time.Unix(int64(c.When), 0).UTC(),
- Revision: resp.NewLink(c.Revision, c.Revlink),
- Description: c.Comments,
- Title: strings.Split(c.Comments, "\n")[0],
- File: files,
- })
+ if b.Sourcestamp != nil {
+ for _, c := range b.Sourcestamp.Changes {
+ files := c.GetFiles()
+ result = append(result, &resp.Commit{
+ AuthorEmail: c.Who,
+ Repo: c.Repository,
+ CommitTime: time.Unix(int64(c.When), 0).UTC(),
+ Revision: resp.NewLink(c.Revision, c.Revlink),
+ Description: c.Comments,
+ Title: strings.Split(c.Comments, "\n")[0],
+ File: files,
+ })
+ }
}
return
}
« no previous file with comments | « no previous file | milo/buildsource/buildbot/pubsub.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698