Clean up redirect_with_ref_type in favour of ambiguous_ref_modal
What does this MR do and why?
-
ambiguous_ref_modal
shows a modal to the user and prompts them to choose the correct ref whereredirect_with_ref_type
would redirect to the tag version of the ref -
redirect_with_ref_type
is a refinement over some existing redirection behaviour - These behaviours overlap we've decided to go with
ambiguous_ref_modal
so this change is to clean upredirect_with_ref_type
and theambiguous_ref_modal
flag toggle between the modal behaviour and the existing redirection behaviour - some behaviour from
redirect_with_ref_type
is still desirable for: #427616 (closed)
Contributes to: #420352 (closed)
How to set up and validate locally
- Create a project with readme
- Create a tag (e.g
git tag other-branch
) - Create a branch with the same name as the tag (e.g
git checkout -b other-branch
) - Push the tag and branch (e.g git push --tags && git push --all)
- Try visiting readme without providing ref_type (e.g
http://gdk.test:3000/root/same-names-project/-/blob/other-branch/README.md
) and be redirected to the branch version of the README with a url containing the commit sha rather than the branch name - Enable the
ambiguous_ref_modal
feature flag - Try visiting readme without providing ref_type and get a modal for choosing the branch or tag version instead.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Edited by Jerry Seto