Skip to content
Snippets Groups Projects

Fix GitHub snippet resolution

Merged Administrator requested to merge github-snippet-resolution into master

Created by: lguychard

Fixes #771 Fixes #3105 Fixes #3110

Deprecates commentSnippetCodeViewResolver, which:

  • Matched entire comments, even though they may have contained several snippets (#3110)
  • Used the first link whose href could be parsed by getGitHubState(), which could be any inline link in a GitHub comment (#771)

Snippet code views are now resolved using the fileLineContainerResolver, to the closes element containing both the code and the permalink. Several snippets contained in the same comment can be accurately resolved.

Test Plan

Code Hosts
  • GitHub
  • GitHub Enterprise
  • Refined GitHub
  • Phabricator
  • Phabricator integration
  • Bitbucket
  • Gitlab
Browsers
  • Chrome
  • Firefox

image image

Merge request reports

Merged by avatar (Jun 19, 2025 7:02pm UTC)

Merge details

  • Changes merged into master with 796788dc.
  • Deleted the source branch.

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading