#458  Allow users to access repositories by name (Web UI URL)
Closed
Marcos de Oliveira opened 1 month ago

After introducing the repository chaining feature, we could not access repositories by their names anymore.
I think the current behavior is because of parent project's URLs (issues, branches, commits, etc). But maybe you could introduce some reserved words for repository names to avoid collisions and use internal routes to access the child repositories panels by URI.

Robin Shen commented 1 month ago

As OneDev evolves, reserved names will expand, and this may conflict with existing project names. Also id will not change even if project is renamed/moved/archived etc.

Marcos de Oliveira commented 1 month ago

I see... Maybe there is a way to do some fuzzy search to match and redirect to the repo ID then, instead of returning 404 directly? My point is that there should be a way to link to a repository by name so people know what they are accessing beforehand. Also, being able to go to a repo by URL would be nice.

Robin Shen commented 1 month ago

This turns out to be difficult with Wicket (web framework used by OneDev) as it expects fixed segments for pages. Since project path now contains arbitrary number of path segments (/project1/child1/child2 etc), it breaks url routes of OneDev pages. The only possible way is to encode path separator / so url will look something like http://onedev-server/project1%2Fchild1%2Fchild2 which seems ugly. The id approach is performant (no need to query path and sub path for project), stable, and easy to implement, with the only exception of not readable, which can be addressed to some extent with link text.

Robin Shen changed state to 'Closed' 1 month ago
Previous Value Current Value
Open
Closed
No comment
issue 1 of 1
Type
Improvement
Priority
Normal
Assignee
Issue Votes (0)
Watchers (3)
Reference
issue onedev/server#458
Please wait...
Page is in error, reload to recover