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

Unified Diff: autoroll/go/repo_manager/repo_manager.go

Issue 1849283002: AutoRolls include Chromium bug links (Closed) Base URL: https://skia.googlesource.com/buildbot@master
Patch Set: ... Created 4 years, 9 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 | go/util/util.go » ('j') | go/util/util.go » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: autoroll/go/repo_manager/repo_manager.go
diff --git a/autoroll/go/repo_manager/repo_manager.go b/autoroll/go/repo_manager/repo_manager.go
index ecf0edcd22c0d4ed2c92065192bcdc297eaaf9eb..1451591a69c92f7f0ffcb7a0bb5d66a9c27a3b2f 100644
--- a/autoroll/go/repo_manager/repo_manager.go
+++ b/autoroll/go/repo_manager/repo_manager.go
@@ -285,6 +285,29 @@ func (r *repoManager) CreateNewRoll(emails []string, cqExtraTrybots string, dryR
if _, err := exec.RunCwd(r.chromiumDir, "git", "config", "user.email", autoroll.ROLL_AUTHOR); err != nil {
return 0, err
}
+
+ // Find Chromium bugs.
+ bugs := []string{}
+ cr := r.childRepo
+ commits, err := cr.RevList(fmt.Sprintf("%s..%s", r.lastRollRev, r.childHead))
+ if err != nil {
+ return 0, fmt.Errorf("Failed to list revisions: %s", err)
+ }
+ for _, c := range commits {
+ d, err := cr.Details(c, false)
+ if err != nil {
+ return 0, fmt.Errorf("Failed to obtain commit details: %s", err)
+ }
+ b := util.BugsFromCommitMsg(d.Body)
+ for _, bug := range b[util.PROJECT_CHROMIUM] {
+ bugs = append(bugs, bug)
+ }
+ }
+
+ args := []string{r.childPath, r.childHead}
+ for _, bug := range bugs {
+ args = append(args, "--bug", bug)
+ }
if _, err := exec.RunCommand(&exec.Command{
Dir: r.chromiumDir,
Env: []string{fmt.Sprintf("PATH=%s:%s", r.depot_tools, os.Getenv("PATH"))},
« no previous file with comments | « no previous file | go/util/util.go » ('j') | go/util/util.go » ('J')

Powered by Google App Engine
This is Rietveld 408576698