Skip to content

Reference the merged PR by number in the conflict comment#38

Closed
Phlogistique wants to merge 2 commits into
mainfrom
conflict-comment-pr-link
Closed

Reference the merged PR by number in the conflict comment#38
Phlogistique wants to merge 2 commits into
mainfrom
conflict-comment-pr-link

Conversation

@Phlogistique
Copy link
Copy Markdown
Collaborator

@Phlogistique Phlogistique commented Jun 1, 2026

The "I tried to merge ... into this branch" sentence named the raw branch ref. Render the merged parent as a #N reference that GitHub links to its PR, using pull_request.number from the event payload (MERGED_PR_NUMBER); the conflict-resolved path reconstructs it from the lookup it already runs. The pre-squash trunk state has no PR, so it stays a backticked commit. The bash recipe is unchanged and still uses the raw ref that git merge needs.

Phlogistique and others added 2 commits June 1, 2026 17:52
The "I tried to merge ... into this branch" sentence named the raw branch
ref. Render it as a "#N" reference that GitHub links to the merged PR; the
pre-squash trunk state has no PR, so it stays a backticked commit. The bash
recipe is unchanged and still uses the raw ref that git merge needs.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The first cut resolved the parent PR with `gh pr list --head`. The
squash-merge event already carries `pull_request.number`, so pass it through
as MERGED_PR_NUMBER and reference it directly. The conflict-resolved path,
which reconstructs the parent from the synchronize payload, picks the number
up from the same lookup it already runs.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant