Compare commits

...

1 Commits

Author SHA1 Message Date
Sebastian Ullrich
f1de0b3e76 chore: CI: exempt drafts from PR body check 2024-11-07 22:18:37 +01:00

View File

@@ -3,7 +3,7 @@ name: Check PR body for changelog convention
on:
merge_group:
pull_request:
types: [opened, synchronize, reopened, edited, labeled]
types: [opened, synchronize, reopened, edited, labeled, converted_to_draft, ready_for_review]
jobs:
check-pr-body:
@@ -13,8 +13,8 @@ jobs:
uses: actions/github-script@v7
with:
script: |
const { title, body, labels } = context.payload.pull_request;
if (/^(feat|fix):/.test(title) && !labels.some(label => label.name == "changelog-no")) {
const { title, body, labels, draft } = context.payload.pull_request;
if (!draft && /^(feat|fix):/.test(title) && !labels.some(label => label.name == "changelog-no")) {
if (!labels.some(label => label.name.startsWith("changelog-"))) {
core.setFailed('feat/fix PR must have a `changelog-*` label');
}