Reference the merged PR by number in the conflict comment#38
Closed
Phlogistique wants to merge 2 commits into
Closed
Reference the merged PR by number in the conflict comment#38Phlogistique wants to merge 2 commits into
Phlogistique wants to merge 2 commits into
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The "I tried to merge ... into this branch" sentence named the raw branch ref. Render the merged parent as a
#Nreference that GitHub links to its PR, usingpull_request.numberfrom 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 thatgit mergeneeds.