aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authorOgulcan Celik <ogulcancelik@gmail.com>2026-05-17 04:10:29 +0300
committerOgulcan Celik <ogulcancelik@gmail.com>2026-05-17 04:19:50 +0300
commit1586fc420942122c7b5948397becca9ddb602b15 (patch)
tree7db45490dd1ef08a30c7a4f92f7f80a165441083 /.github/workflows
parentdb6f9afad27142248150096aa886f1057c1ebcd6 (diff)
chore: refine issue contributor intent flow
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;
}