mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Fix DangerJS check for MR title - exact match WIP and DRAFT
This commit is contained in:
parent
146a5c4de4
commit
fd3c8a0d3e
@ -8,8 +8,11 @@ import { danger, warn, message, results } from "danger"
|
||||
function checkMrTitle() {
|
||||
const mrTitle = danger.gitlab.mr.title
|
||||
|
||||
if (mrTitle.toUpperCase().includes("WIP") || mrTitle.toUpperCase().includes("DRAFT")) {
|
||||
return warn("Please remove the `WIP:`/`Draft:` prefix from the MR name before merging this MR.");
|
||||
const regexWip = /^WIP:/i;
|
||||
const regexDraft = /^DRAFT:/i;
|
||||
|
||||
if ((regexWip.test(mrTitle)) || (regexDraft.test(mrTitle))) {
|
||||
return warn("Please remove the `WIP:`/`DRAFT:` prefix from the MR name before merging this MR.");
|
||||
}
|
||||
}
|
||||
checkMrTitle();
|
||||
|
Loading…
x
Reference in New Issue
Block a user