docs(merge-queue): document Trunk merge queue and enforcement setup#3202
docs(merge-queue): document Trunk merge queue and enforcement setup#3202gantoine wants to merge 2 commits into
Conversation
Add docs/merge-queue.md covering how contributors merge through the Trunk queue (`/trunk merge`), how to inspect the `Trunk Merge Queue (main)` check run, and the one-time GitHub ruleset + Trunk dashboard admin checklist that makes the queue the only path into `main`. Link it from CONTRIBUTING.md and the AGENTS.md reference list. Generated-By: PostHog Code Task-Id: 2d321370-0c0e-4d63-89d7-e367ebd9ecee
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
|
Reviews (1): Last reviewed commit: "docs(merge-queue): document Trunk merge ..." | Re-trigger Greptile |
|
|
||
| Agents working in PostHog Code follow the [`merging-prs` skill](../.claude/skills/merging-prs/SKILL.md), which enqueues a PR and babysits it until it merges or fails. | ||
|
|
||
| --- |
There was a problem hiding this comment.
Broken link to non-existent skill file
The referenced file ../.claude/skills/merging-prs/SKILL.md (resolved: .claude/skills/merging-prs/SKILL.md) does not exist anywhere in the repository. Any agent that encounters this doc and tries to follow the link — exactly the scenario this sentence describes — will hit a dead path and may fall back to an undefined behavior. Either create the skill file as part of this PR, or remove/update the reference until it exists.
| Check the queue status without leaving the terminal: | ||
|
|
||
| ```bash | ||
| gh api repos/PostHog/code/commits/$(gh pr view <number> --json headRefOid -q .headRefOid)/check-runs \ |
There was a problem hiding this comment.
The
gh api call hardcodes PostHog/code, so it breaks for any fork or if the repo is renamed. Using gh repo view to resolve the current repo name makes the snippet self-contained and portable.
| gh api repos/PostHog/code/commits/$(gh pr view <number> --json headRefOid -q .headRefOid)/check-runs \ | |
| gh api repos/$(gh repo view --json nameWithOwner -q .nameWithOwner)/commits/$(gh pr view <number> --json headRefOid -q .headRefOid)/check-runs \ |
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Use `gh repo view` to resolve the current repo instead of hardcoding `PostHog/code`, so the check-run status snippet works on forks and survives a repo rename. Generated-By: PostHog Code Task-Id: 2d321370-0c0e-4d63-89d7-e367ebd9ecee
What
Documents the Trunk merge queue and the GitHub settings that make it the only path into
main.docs/merge-queue.md:/trunk merge(never the GitHub merge button orgh pr merge), read theTrunk Merge Queue (main)check run, handle a kicked PR, enqueue from the CLI.main(Restrict updates with thetrunk-ioapp on bypass inExemptmode; a separate required-checks ruleset with no Trunk bypass), thetrunk-temp/**/*+trunk-merge/**/*branch exclusions, draft-PR mode, and a smoke test.CONTRIBUTING.mdand theAGENTS.mdreference list.Why
The org adopted the Trunk merge queue and wants queue-only merges. Nothing in the repo documented the enforcement settings or the day-to-day flow.
Notes
.github/workflows/changes — existingpull_requestworkflows run on Trunk's draft PRs unchanged.Created with PostHog Code