massrebuilder: add darwin label based on title
This commit is contained in:
parent
6d215f3332
commit
655cb9d960
|
@ -58,6 +58,20 @@ impl<E: stats::SysEvents> MassRebuildWorker<E> {
|
|||
return massrebuildjob::Actions {};
|
||||
}
|
||||
|
||||
fn tag_from_title(&self, issue: &hubcaps::issues::IssueRef) {
|
||||
let darwin = issue.get()
|
||||
.map(|iss| iss.title.to_lowercase().contains("darwin"))
|
||||
.unwrap_or(false);
|
||||
|
||||
if darwin {
|
||||
update_labels(
|
||||
&issue,
|
||||
vec![String::from("6.topic: darwin")],
|
||||
vec![],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
fn tag_from_paths(&self, issue: &hubcaps::issues::IssueRef, paths: Vec<String>) {
|
||||
let mut tagger = PathsTagger::new(self.tag_paths.clone());
|
||||
|
||||
|
@ -135,6 +149,8 @@ impl<E: stats::SysEvents> worker::SimpleWorker for MassRebuildWorker<E> {
|
|||
}
|
||||
}
|
||||
|
||||
self.tag_from_title(&issue);
|
||||
|
||||
let mut overall_status = CommitStatus::new(
|
||||
repo.statuses(),
|
||||
job.pr.head_sha.clone(),
|
||||
|
|
Loading…
Reference in a new issue