Another thing I've noticed with using the Graphite...
# how-do-i
d
Another thing I've noticed with using the Graphite merge queue: We were using GitHub Rulesets to ensure that PRs got an approving review from the right team, we are not currently using CODEOWNERS. We need to let Graphite bypass the ruleset to do CI optimizations - that's fine -- but it doesn't seem to enforce things from our Ruleset before adding PRs to the merge queue any more. It adds a PR with auto-merge enabled to the queue as soon as anyone approves the PR, not just someone from the right team. I don't see any settings around approvals in Graphite's UI - so I'm wondering what rules it enforces? Does it always require a single review from anyone? Does it respect CODEOWNERS if we switch to that? Thanks!
c
Hey There! For CI optimizations, Graphite intentionally lands the optimized temporary branch and then closes the individual PRs in the stack rather than marking each one as GitHub “merged.” Graphite still treats those PRs as merged in its own product, but integrations that rely specifically on GitHub’s merged state, like Linear or PR metrics tooling, may see them as closed instead. For Linear, the best workaround is to either key off landed commits or apply Linear’s
externally-merged
label before Graphite closes the PR, so Linear can treat it as merged. For metrics, tracking commits merged to trunk is usually more reliable than relying on PR merged vs closed state. On approvals: because Graphite needs the
graphite-app
to bypass the GitHub ruleset for CI optimizations, GitHub won’t enforce the bypassed rule’s team-approval condition at merge time. Graphite does not have a setting to require approval from a specific team; it generally queues once there is an approval and checks are green. If you need scoped reviewer enforcement, CODEOWNERS plus “Require review from Code Owners” is the supported path. The most robust approach is a required status check that validates the correct team approval, in a ruleset Graphite is not allowed to bypass.
d
Thanks for the reply - is there a way to configure Graphite to add the
externally-merged
label automatically when the temporary branch has been merged? It looks like that would solve the problem for us on the Linear end - but I don't see anything in Automations that would let me use a merge event as a trigger.
c
Not currently, but logged this as a feature request for the team. No ETA on when or if we ship but if we do we will double back and alert you. Automations can’t trigger on merge/close, and they only run on open PRs, so they won’t auto-add
externally-merged
when the queue lands and closes the original. Linear needs that label before close: *https://graphite.com/docs/merge-queue-optimizations*
👍🏻 1