aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2019-02-17 15:46:16 +0100
committerDmitry Vyukov <dvyukov@google.com>2019-02-17 15:46:16 +0100
commit59f36113ee97b3d2d2c872e23841eda592a4201d (patch)
tree73d10152db3784ddbb719aa2e5c27c8b7faf73f7
parent6a4471c2e5cb34c20d44763697cd13138f3f2c86 (diff)
syz-ci: don't extract fixing commits if no report email
There can be no ReportEmail is email reporting is not used, don't poll fixing commits in such case.
-rw-r--r--syz-ci/jobs.go30
1 files changed, 16 insertions, 14 deletions
diff --git a/syz-ci/jobs.go b/syz-ci/jobs.go
index c74e7b2be..8998ce0fd 100644
--- a/syz-ci/jobs.go
+++ b/syz-ci/jobs.go
@@ -107,21 +107,23 @@ func (jp *JobProcessor) pollManagerCommits(mgr *Manager) error {
if brokenRepo(repo.URL) {
continue
}
- commits1, err := jp.pollRepo(mgr, repo.URL, repo.Branch, resp.ReportEmail)
- if err != nil {
- jp.Errorf("failed to poll %v %v: %v", repo.URL, repo.Branch, err)
- continue
- }
- log.Logf(1, "got %v commits from %v/%v repo", len(commits1), repo.URL, repo.Branch)
- for _, com := range commits1 {
- // Only the "main" repo is the source of true hashes.
- if i != 0 {
- com.Hash = ""
+ if resp.ReportEmail != "" {
+ commits1, err := jp.pollRepo(mgr, repo.URL, repo.Branch, resp.ReportEmail)
+ if err != nil {
+ jp.Errorf("failed to poll %v %v: %v", repo.URL, repo.Branch, err)
+ continue
}
- // Not overwrite existing commits, in particular commit from the main repo with hash.
- if _, ok := commits[com.Title]; !ok && !jp.knownCommits[com.Title] && len(commits) < 100 {
- commits[com.Title] = com
- jp.knownCommits[com.Title] = true
+ log.Logf(1, "got %v commits from %v/%v repo", len(commits1), repo.URL, repo.Branch)
+ for _, com := range commits1 {
+ // Only the "main" repo is the source of true hashes.
+ if i != 0 {
+ com.Hash = ""
+ }
+ // Not overwrite existing commits, in particular commit from the main repo with hash.
+ if _, ok := commits[com.Title]; !ok && !jp.knownCommits[com.Title] && len(commits) < 100 {
+ commits[com.Title] = com
+ jp.knownCommits[com.Title] = true
+ }
}
}
if i == 0 && len(resp.Commits) != 0 {