mass rebuild: skip closed PRs, closes #9

This commit is contained in:
Graham Christensen 2017-11-29 08:24:49 -05:00
parent e188462323
commit 94f5d9b0cc
No known key found for this signature in database
GPG key ID: ACA1C1D120C83D5C

View file

@ -63,6 +63,20 @@ impl worker::SimpleWorker for MassRebuildWorker {
let gists = self.github.gists();
let issue = repo.issue(job.pr.number);
match issue.get() {
Ok(iss) => {
if iss.state == "closed" {
info!("Skipping {} because it is closed", job.pr.number);
return self.actions().skip(&job);
}
}
Err(e) => {
info!("Error fetching {}!", job.pr.number);
info!("E: {:?}", e);
return self.actions().skip(&job);
}
}
let mut overall_status = CommitStatus::new(
repo.statuses(),
job.pr.head_sha.clone(),