Repository navigation
fix(github): Link cross-repo references in GitHub bodies - #2576
Open
sentry-junior[bot] wants to merge 1 commit into
Open
sentry-junior[bot] wants to merge 1 commit into
sentry-junior[bot] wants to merge 1 commit into
Conversation
Bare owner/repo#N shorthand can be claimed by a repository autolink. In getsentry/sentry, the SENTRY- prefix turned getsentry/sentry-docs#20303 into a Sentry issue search link plus a link to getsentry/sentry#20303. Rewrite the shorthand to Markdown links in PR, issue, and review bodies; GitHub leaves link labels alone. Co-Authored-By: Matt Duncan <14761+mrduncan@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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.
Junior wrote
getsentry/sentry-docs#20303in the body of getsentry/sentry#129613. getsentry/sentry has a repository autolink with the prefixSENTRY-. That autolink took thesentry-docspart and made it a Sentry issue search link (query=SENTRY-docs). GitHub then linked the leftover#20303to getsentry/sentry#20303, which is the wrong PR. Both references in that body broke this way. getsentry/sentry#129100 has the same problem.Markdown link labels render correctly in that repo, for example
[getsentry/sentry-cocoa#6515](…)in getsentry/sentry#127146. Slack replies already go throughlinkifyGitHubReferences, and it produces exactly that form. This change also runs it on model-written bodies increatePullRequest,updatePullRequest,createIssue,updateIssue, andsubmitPullRequestReview(the summary and inline comments). The function already skips code, existing links, URLs, and HTML comments, so a second pass over a body changes nothing.Comments posted with
ghfrom the sandbox don't go through these tools, so they still aren't covered.via @mrduncan.
--
View Session [Sentry]