aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/label-intends-to-pr.yml9
1 files changed, 5 insertions, 4 deletions
diff --git a/.github/workflows/label-intends-to-pr.yml b/.github/workflows/label-intends-to-pr.yml
index 11136ec3..731f0f82 100644
--- a/.github/workflows/label-intends-to-pr.yml
+++ b/.github/workflows/label-intends-to-pr.yml
@@ -24,9 +24,10 @@ jobs:
const body = context.payload.issue.body || '';
const issueNumber = context.payload.issue.number;
const { owner, repo } = context.repo;
- const checkedIntentPattern = /^\s*-\s*\[[xX]\]\s*I intend to open a PR for this change\.\s*$/m;
- const uncheckedIntentPattern = /^\s*-\s*\[ \]\s*I intend to open a PR for this change\.\s*$/m;
- const shouldAddLabel = checkedIntentPattern.test(body);
+ const checkedIntentPattern = /^\s*-\s*\[[xX]\]\s*I intend to open a PR for this (?:change|issue)\.\s*$/m;
+ const uncheckedIntentPattern = /^\s*-\s*\[ \]\s*I intend to open a PR for this (?:change|issue)\.\s*$/m;
+ const cliIntentPattern = /^\s*\/i-intend-to-pr\s*$/m;
+ const shouldAddLabel = checkedIntentPattern.test(body) || cliIntentPattern.test(body);
const shouldRemoveLabel = uncheckedIntentPattern.test(body);
const labels = context.payload.issue.labels.map((item) =>
typeof item === 'string' ? item : item.name,
@@ -44,7 +45,7 @@ jobs:
}
if (!shouldAddLabel && !shouldRemoveLabel) {
- console.log(`No contribution intent checkbox found for #${issueNumber}.`);
+ console.log(`No contribution intent signal found for #${issueNumber}.`);
return;
}