Follow-up from "Frontend changes to support fully qualified refs on blob and tree view"
The following discussion from !122145 (merged) should be addressed:
-
@leipert started a discussion: (+1 comment) @jerasmus If the colliding BRANCH is made the default branch, things get really weird. In the project overview
- Commit message from the TAG is loaded
- Last commit, etc from the branch doesn't load.
- It detects a README.md (even though the branch has none, but only the TAG)
edit: After a bit of investigation it seems like:
- The readme path for the repository can be return the wrong result when
Repository#head_treereturns the Tree object for tag. This causes the button to add a readme display when it actually shouldn't.- Proposal: We should consider having head_tree always return a Tree object for a branch
- The last commit message widget is on the project overview is expecting to find ref type from query params, but this is implicitly a branch and there is no ref type for this age
- Proposal Instantiate the last commit vue app for the project overview to request a branch
- The last commit messages for each file/folder in the tree view are incorrect because the endpoint is expecting the ref type in lower case and it is uppercase
- Proposal Simplify the API by making controllers case sensitive for ref_type (currently the graphql endpoint expects uppercase when applicable while controllers expect lowercase)
Edited by Jerry Seto