Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

fix(ci): skip separation checks on merge queue batches (#77521)

Georges-Antoine Assi6d6565f26a11
diff --git a/.github/workflows/desktop-ci.yml b/.github/workflows/desktop-ci.yml
index 3c6815d40875..2b6e639d7b19 100644
--- a/.github/workflows/desktop-ci.yml
+++ b/.github/workflows/desktop-ci.yml
@@ -60,8 +60,17 @@ jobs:
# existing Desktop Tests Pass required check covers it.
backend-coupling:
name: Desktop backend coupling
- # merge_group has no pull_request payload; the check already ran on the PR
- if: github.event_name == 'pull_request'
+ # merge_group has no pull_request payload; the check already ran on the PR.
+ # trunk-merge/** is the same story for Trunk's merge queue: it opens a real
+ # PR batching several already-checked PRs, so a desktop PR riding along with
+ # an unrelated backend PR would fail a coupling that no author introduced.
+ # The skip is scoped to same-repo heads so a fork can't opt out of the gate
+ # by naming its branch trunk-merge/**; only write access can create one here.
+ if: |
+ github.event_name == 'pull_request' && !(
+ github.event.pull_request.head.repo.full_name == github.repository &&
+ startsWith(github.head_ref, 'trunk-merge/')
+ )
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
diff --git a/.github/workflows/pr-housekeeping.yml b/.github/workflows/pr-housekeeping.yml
index cf0a8be0ff6a..828425a4f8e6 100644
--- a/.github/workflows/pr-housekeeping.yml
+++ b/.github/workflows/pr-housekeeping.yml
@@ -92,7 +92,15 @@ jobs:
GH_APP_POSTHOG_REVIEW_COMMENT_RESOLVER_PRIVATE_KEY: ${{ secrets.GH_APP_POSTHOG_REVIEW_COMMENT_RESOLVER_PRIVATE_KEY }}
migrations-separation:
- if: contains(fromJSON('["opened", "synchronize", "reopened"]'), github.event.action)
+ # Same reason the desktop coupling check skips trunk-merge/**: the queue's
+ # batch PR is the union of several PRs that each passed separately, so a
+ # migration PR batched with a nodejs or rust PR trips a coupling nobody wrote.
+ # Same-repo scoping too, so a fork can't skip the check by branch name.
+ if: |
+ contains(fromJSON('["opened", "synchronize", "reopened"]'), github.event.action) && !(
+ github.event.pull_request.head.repo.full_name == github.repository &&
+ startsWith(github.head_ref, 'trunk-merge/')
+ )
uses: ./.github/workflows/ci-migrations-service-separation-check.yml
secrets:
GH_APP_POSTHOG_PATHS_FILTER_APP_ID: ${{ secrets.GH_APP_POSTHOG_PATHS_FILTER_APP_ID }}