Cyrille B. Delavenne
02/17/2026, 5:43 PMexternally-merged label to the PR before merging worked. I wrote a GH Actions script and we were able to automate this, and the Linear auto-transition is fixed now:
name: Linear - mark externally-merged when queued in Graphite
on:
issue_comment:
types: [created]
permissions:
pull-requests: write
jobs:
label:
runs-on: ubuntu-latest
steps:
- name: Add externally-merged label
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
if (!context.payload.issue.pull_request) return;
const commentAuthor = context.payload.comment.user.login;
if (commentAuthor !== 'graphite-app[bot]') return;
const comment = context.payload.comment.body;
const queuePhrase = 'added this pull request to the [Graphite merge queue]';
if (!comment.includes(queuePhrase)) return;
const prNumber = context.payload.issue.number;
await github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: prNumber,
labels: ['externally-merged']
});
It's not the most robust way of handling it since it could break if the queuePhrase changes, but it works for now at least.Pylon
02/17/2026, 5:52 PMCyrille B. Delavenne
02/17/2026, 7:30 PM