Skip to content

Fix GitHub snippet resolution

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

Loading