Repository navigation
Conversation
repo_match took any repository whose URL was a text prefix of the link, so a link into acme/app-v2 also matched acme/app. The repository query has no order, so the code mapping could silently point at the wrong repository: the path parser strips the shorter repo's prefix and still finds a plausible branch and file path. Co-Authored-By: Claude <noreply@anthropic.com>
Contributor
Author
|
Superseded by #128328. |
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.
When you set up a code mapping by pasting a link to a file, Sentry finds the connected repository the link points into. It took any repository whose URL was the start of the link, so a link into
acme/app-v2also matchedacme/app. The repositories come back in no particular order, so Sentry could create the code mapping againstacme/appwithout any error: the file path still parses, because the parser strips the shorter repository's URL and finds/blob/<branch>/...right after it.The repository URL now has to end where the link continues with a
/. This is the repository-level version of the integration-level bug fixed in #128171 and its sibling PRs, and it doesn't depend on them.No flag: the check only gets stricter, and the only links it stops matching are ones that pointed into a different repository. Azure DevOps links name the file in the query string, not the path, but they never reach this check: the endpoint already rejects them, because the last path segment is the repository name, not the file name.