Skip to content

Support fully qualified refs for contributors view

Jerry Seto requested to merge 219583-contributors-page into master

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 handle ref_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

  1. Enable the use_ref_type_parameter feature flag
  2. Set up a project
  3. checkout a new branch with some commits and push
  4. 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
  1. Go to the contributors page

Screen_Shot_2022-11-22_at_2.20.27_PM

  1. 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.

Related to #219583 (closed)

Edited by Jerry Seto

Merge request reports

Loading