Skip to content

Refactor FileInfo in browser extension

Administrator requested to merge mz/refactor-fileinfo into master

Created by: marekweb

Refactor FileInfo to have base and head properties to replace the need for base* prefixed properties and also eliminate the need for headHasFileContents and baseHasFileContents.

  • Create new type definitions: FileInfo, FileDiff, DiffOrFileInfo
  • Update operations on FileInfo (resolve repo names, fetch file content)
  • Update handler for added code views
    • initialize model and viewer from DiffOrFileInfo
    • apply decorations
    • apply code intelligence / implement resolveContext
  • Update CodeViewToolbar to use DiffOrFileInfo
  • Update code host resolvers
    • GitHub
    • Gitlab
    • Bitbucket
    • Phabricator
  • Testing
    • Tests pass on all code hosts
    • Manual on all code hosts
  • Add doc strings to new functions
  • Revisit naming: for the new types, properties, functions
    • going to keep blob for now and rename it in a new PR

Fixes #3107

Merge request reports

Loading