feat: add bypass-branch-check label to skip branch enforcement

This commit is contained in:
jubnl
2026-04-28 05:16:49 +02:00
parent 03b33cb19e
commit 2a1f063ea2
2 changed files with 9 additions and 0 deletions
@@ -21,6 +21,12 @@ jobs:
const labels = context.payload.pull_request.labels.map(l => l.name);
const prNumber = context.payload.pull_request.number;
// bypass-branch-check label skips all enforcement
if (labels.includes('bypass-branch-check')) {
console.log('bypass-branch-check label present, skipping enforcement.');
return;
}
// If the base was fixed, remove the label and let it through
if (base !== 'main') {
if (labels.includes('wrong-base-branch')) {