Tighten up when ofborg considers a PR WIP
This commit is contained in:
parent
42d1bb3099
commit
55bf2742c9
|
@ -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
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue