mass rebuild: skip closed PRs, closes #9
This commit is contained in:
parent
e188462323
commit
94f5d9b0cc
|
@ -63,6 +63,20 @@ impl worker::SimpleWorker for MassRebuildWorker {
|
||||||
let gists = self.github.gists();
|
let gists = self.github.gists();
|
||||||
let issue = repo.issue(job.pr.number);
|
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(
|
let mut overall_status = CommitStatus::new(
|
||||||
repo.statuses(),
|
repo.statuses(),
|
||||||
job.pr.head_sha.clone(),
|
job.pr.head_sha.clone(),
|
||||||
|
|
Loading…
Reference in a new issue