Skip to content

Support fully qualified refs for find file

Jerry Seto requested to merge 219583-find-file-only into master

What does this MR do and why?

Supports fully qualified refs for find file view

  • updates find file controller to use fully qualified ref when listing files
  • update frontend components to link to blob urls with 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_again.txt && git add hello_again.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. navigate to the find_file view (e.g http://127.0.0.1:3000/root/projectname/-/find_file/main)
  8. use the drop down menu to switch between branch and tag and see that the files in each are as expected.

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