mads
07/02/2026, 12:29 PMGareth Brickman
07/02/2026, 1:20 PMmads
07/02/2026, 1:23 PMmads
07/02/2026, 1:50 PMexternally-merged label on the PR before it's closed. Does Graphite do that automatically, or do I need to set that up somwhre?Gareth Brickman
07/02/2026, 2:05 PMname: Linear - mark externally-merged when queued in Graphite
on:
issue_comment:
types: [created]
permissions: {}
jobs:
label-externally-merged:
permissions:
pull-requests: write # Required to add labels to PRs
steps:
- name: Add externally-merged label
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
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']
});mads
07/02/2026, 2:18 PM