From 55bf2742c9d9b888a458e7b6e08e3c3f11d15227 Mon Sep 17 00:00:00 2001 From: Graham Christensen Date: Sat, 3 Feb 2018 12:47:08 -0500 Subject: [PATCH] Tighten up when ofborg considers a PR WIP --- README.md | 2 +- ofborg/src/tasks/massrebuilder.rs | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 0c3d361..523169e 100644 --- a/README.md +++ b/README.md @@ -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 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. ## Commands diff --git a/ofborg/src/tasks/massrebuilder.rs b/ofborg/src/tasks/massrebuilder.rs index d06d470..71a2756 100644 --- a/ofborg/src/tasks/massrebuilder.rs +++ b/ofborg/src/tasks/massrebuilder.rs @@ -771,7 +771,11 @@ mod tests { } 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; } @@ -781,10 +785,6 @@ fn issue_is_wip(issue: &hubcaps::issues::Issue) -> bool { fn indicates_wip(text: &str) -> bool { let text = text.to_lowercase(); - if text.contains("wip") { - return true; - } - if text.contains("work in progress") { return true; }