Tighten up when ofborg considers a PR WIP

This commit is contained in:
Graham Christensen 2018-02-03 12:47:08 -05:00
parent 42d1bb3099
commit 55bf2742c9
No known key found for this signature in database
GPG key ID: ACA1C1D120C83D5C
2 changed files with 6 additions and 6 deletions

View file

@ -24,7 +24,7 @@ If a PR is opened with many commits, it will create a single build job
for all of the detected packages. If a PR is opened and many commits for all of the detected packages. If a PR is opened and many commits
are pushed one by one to the open PR, many build jobs will be created. are pushed one by one to the open PR, many build jobs will be created.
To disable automatic building of packages on a PR, add `WIP` to the To disable automatic building of packages on a PR, add `[WIP]` to the
PR's title, or the `2.status: work-in-progress` label. PR's title, or the `2.status: work-in-progress` label.
## Commands ## Commands

View file

@ -771,7 +771,11 @@ mod tests {
} }
fn issue_is_wip(issue: &hubcaps::issues::Issue) -> bool { fn issue_is_wip(issue: &hubcaps::issues::Issue) -> bool {
if indicates_wip(&issue.title) { if issue.title.contains("[WIP]") {
return true;
}
if issue.title.starts_with("WIP:") {
return true; return true;
} }
@ -781,10 +785,6 @@ fn issue_is_wip(issue: &hubcaps::issues::Issue) -> bool {
fn indicates_wip(text: &str) -> bool { fn indicates_wip(text: &str) -> bool {
let text = text.to_lowercase(); let text = text.to_lowercase();
if text.contains("wip") {
return true;
}
if text.contains("work in progress") { if text.contains("work in progress") {
return true; return true;
} }