From 8f88f4d71df9af7f79f6bda251debc9471c2672f Mon Sep 17 00:00:00 2001 From: Arpit Bruno Date: Mon, 5 Oct 2026 15:28:50 +0530 Subject: [PATCH 1/2] fail a PR that changes the package without a changeset --- .github/workflows/changeset.yml | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/.github/workflows/changeset.yml b/.github/workflows/changeset.yml index 2f3baadb..9bbfe5a5 100644 --- a/.github/workflows/changeset.yml +++ b/.github/workflows/changeset.yml @@ -2,14 +2,34 @@ name: Changeset on: pull_request: - types: [labeled] + types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled] branches: [main, 'release/**'] jobs: + changeset_check: + if: > + github.event.pull_request.draft == false && + !contains(github.event.pull_request.labels.*.name, 'skip-changeset') + runs-on: ubuntu-latest + permissions: + contents: read + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 2 + + - name: Package changes need a changeset + run: | + git diff --quiet HEAD^1 HEAD -- packages/bruno-api-docs ':!*.md' && exit 0 + [ -n "$(git diff --name-only --diff-filter=A HEAD^1 HEAD -- '.changeset/*.md' ':!.changeset/README.md')" ] && exit 0 + echo "::error::This PR changes packages/bruno-api-docs but adds no changeset. Use the link in the changeset bot's comment, or run npx changeset. Tests-only or chore PRs can add the skip-changeset label." + exit 1 + changeset: # A fork PR gets a read-only token, so the push would 403. Skip cleanly instead of - # failing. fork contributors are covered by the changeset status check. + # failing. Fork contributors add the changeset themselves, the check job enforces it. if: > + github.event.action == 'labeled' && startsWith(github.event.label.name, 'changeset:') && github.event.pull_request.head.repo.full_name == github.repository runs-on: ubuntu-latest From cac38450e8c4da1c58db6cd21cd9ca913c7836e1 Mon Sep 17 00:00:00 2001 From: Arpit Bruno Date: Mon, 5 Oct 2026 15:37:38 +0530 Subject: [PATCH 2/2] skip renderer checks when only changeset.yml or integrations-matrix.yml changes --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 35cceb1c..f19d70a2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -98,6 +98,8 @@ jobs: - '!**/*.md' - '!LICENSE' - '!.gitignore' + - '!.github/workflows/changeset.yml' + - '!.github/workflows/integrations-matrix.yml' - uses: dorny/paths-filter@0e4a8c6effa4802afeda77dc8d303f8176d7dfad # v3 id: integrations with: