Support fully qualified refs for contributors view
What does this MR do and why?
Fix ambiguous ref names for contributors view
When branches and tags share a name the contributors view defaults to using the tag
This change is to add a ref_type parameter so that they can be disambiguated.
- updates
Projects:GraphsController
to handleref_type
- refactors a bit
- updates menu link to conditionally link the contributors page with ref type
Contributes to: #219583 (closed)
How to set up and validate locally
- Enable the
use_ref_type_parameter
feature flag - Set up a project
- checkout a new branch with some commits and push
- checkout the previous branch, add a tag and push tags For example
git checkout -b "ambiguous-ref-name"
touch somefile.md
git add somefile.md
git commit -m "A commit"
git push origin ambiguous-ref-name
git checkout main
git tag ambiguous-ref-name
git push --tags
- Go to the contributors page
- Switch between the branch and the tag and see that the graphs for the branch are indeed for the branch and not for the tag .
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #219583 (closed)
Edited by Jerry Seto