Skip to content

Commit 688451b

Browse files
authored
Merge pull request aden-hive#1521 from adenhq/feat--allow-Micro-fixes-to-excluded
feat: allow micro fixes be passed as a PR
2 parents ad968a0 + 9ef3628 commit 688451b

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

.github/workflows/pr-requirements.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,14 @@ jobs:
2020
const prNumber = pr.number;
2121
const prBody = pr.body || '';
2222
const prTitle = pr.title || '';
23+
const prLabels = (pr.labels || []).map(l => l.name);
24+
25+
// Allow micro-fix PRs without a linked issue
26+
const isMicroFix = prLabels.includes('micro-fix') || /micro-fix/i.test(prTitle);
27+
if (isMicroFix) {
28+
console.log(`PR #${prNumber} is a Micro-fix, skipping issue requirement.`);
29+
return;
30+
}
2331
2432
// Extract issue numbers from body and title
2533
// Matches: fixes #123, closes #123, resolves #123, or plain #123
@@ -44,6 +52,8 @@ jobs:
4452
2. Assign yourself to the issue
4553
3. Re-open this PR and add \`Fixes #123\` in the description
4654
55+
**Exception:** If this is a micro-fix, add the \`micro-fix\` label or include \`micro-fix\` in the PR title to bypass this requirement.
56+
4757
**Why is this required?** See #472 for details.`;
4858
4959
const comments = await github.rest.issues.listComments({
@@ -123,6 +133,8 @@ jobs:
123133
1. Assign yourself (@${prAuthor}) to one of the linked issues
124134
2. Re-open this PR
125135
136+
**Exception:** If this is a micro-fix, add the \`micro-fix\` label or include \`micro-fix\` in the PR title to bypass this requirement.
137+
126138
**Why is this required?** See #472 for details.`;
127139
128140
const comments = await github.rest.issues.listComments({

0 commit comments

Comments
 (0)