From 2e8e579df245c2f2a4f8c6a0846d76c2bfc67ce6 Mon Sep 17 00:00:00 2001 From: James Russo Date: Wed, 22 Apr 2026 17:19:04 -0400 Subject: [PATCH] ci: skip PR runs when targeting a non-main base branch (#426) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ci: skip PR runs when targeting a non-main base branch Adds `branches: [main]` to the `pull_request:` trigger of each workflow that runs on PRs (CI, regression, Windows render verification, Docs, Catalog Previews). PRs whose base is something other than main — typical for stacked PRs — no longer trigger these workflows. On a 5-PR Graphite stack this turns 5× CI runs into 1× (when the tip of the stack reaches main). When a child PR is rebased/promoted so its base becomes main, CI fires as normal. publish.yml and the default CodeQL setup are untouched: publish already filters to main, and CodeQL is default-setup (org UI, not a repo YAML). * chore(ci): fix oxfmt formatting on renovate.json Same drive-by as #423. Renovate's config-migration PR #422 landed unformatted (Renovate bot skips lefthook), so every PR branched from current main fails `bun run format:check`. Whichever of #423 / #426 merges first cleans it up. --- .github/renovate.json | 4 +--- .github/workflows/catalog-previews.yml | 1 + .github/workflows/ci.yml | 1 + .github/workflows/docs.yml | 1 + .github/workflows/regression.yml | 1 + .github/workflows/windows-render.yml | 1 + 6 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/renovate.json b/.github/renovate.json index b4c5c5d544..56277761f0 100644 --- a/.github/renovate.json +++ b/.github/renovate.json @@ -36,9 +36,7 @@ }, { "enabled": false, - "matchPackageNames": [ - "/^@hyperframes//" - ] + "matchPackageNames": ["/^@hyperframes//"] } ] } diff --git a/.github/workflows/catalog-previews.yml b/.github/workflows/catalog-previews.yml index e0ebbfd56a..7597e6c086 100644 --- a/.github/workflows/catalog-previews.yml +++ b/.github/workflows/catalog-previews.yml @@ -2,6 +2,7 @@ name: Catalog Previews on: pull_request: + branches: [main] paths: - "registry/blocks/**" - "registry/components/**" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5a5eb68e17..4367c87df3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,6 +2,7 @@ name: CI on: pull_request: + branches: [main] push: branches: [main] diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 8c1b994c8c..cb44450ef1 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -2,6 +2,7 @@ name: Docs on: pull_request: + branches: [main] paths: - "docs/**" - "DOCS_GUIDELINES.md" diff --git a/.github/workflows/regression.yml b/.github/workflows/regression.yml index b1fe21f089..73871aa2ac 100644 --- a/.github/workflows/regression.yml +++ b/.github/workflows/regression.yml @@ -2,6 +2,7 @@ name: regression on: pull_request: + branches: [main] push: branches: - main diff --git a/.github/workflows/windows-render.yml b/.github/workflows/windows-render.yml index 5c3c2ce304..01c178970a 100644 --- a/.github/workflows/windows-render.yml +++ b/.github/workflows/windows-render.yml @@ -8,6 +8,7 @@ name: Windows render verification on: pull_request: + branches: [main] push: branches: [main] workflow_dispatch: