From f1de0b3e7651035c01fdde4d67d0e025b4dc59fb Mon Sep 17 00:00:00 2001 From: Sebastian Ullrich Date: Thu, 7 Nov 2024 22:18:37 +0100 Subject: [PATCH] chore: CI: exempt drafts from PR body check --- .github/workflows/pr-body.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr-body.yml b/.github/workflows/pr-body.yml index 62c548db2d9b..475229236ccc 100644 --- a/.github/workflows/pr-body.yml +++ b/.github/workflows/pr-body.yml @@ -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'); }