Skip to content

Support fully qualified refs for blobs view

Jerry Seto requested to merge 219583-blob into master

What does this MR do and why?

In order to disambiguate tags and branches with the same name on the blobs view this:

  • updates blob resolver to accept ref_type parameter
  • updates frontend components to supply ref_type parameter
  • updates blob presenter render paths including the ref_type parameter

Contributes to: #219583 (closed)

How to set up and validate locally

  1. enable the use_ref_type_parameter feature flag
  2. create a project
  3. make a commit with some change(echo 'hello' > hello.txt && git add hello.txt && git commit -m 'hello')
  4. add a tag and push it (git tag 'hello' && git push origin hello)
  5. make another change (echo 'hello again ' >> hello.txt && git add hello.txt && git commit -m 'hello again')
  6. make a branch with the same name and push (git checkout -b hello && git push origin refs/heads/hello)
  7. open the blob view and see that the contents of blobs is correct for the branch vs the tag by changing the ref_type parameter (http://127.0.0.1:3000/root/projectname/-/blob/hello/hello.txt?ref_type=heads)

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #219583 (closed)

Edited by Jerry Seto

Merge request reports

Loading