Redirect from gerrit project URI path, e.g.:
From:
https://phabricator.wikimedia.org/r/phabricator/extensions/
To:
https://phabricator.wikimedia.org/diffusion/PHEX/
This allows external tools to link to repos without knowing their callsign.
Differential D51
Redirect gerrit repo URIs to diffusion callsigns. mmodell on Nov 16 2015, 10:06 AM. Authored by Tags None Referenced Files
Details
Redirect from gerrit project URI path, e.g.: From: https://phabricator.wikimedia.org/r/phabricator/extensions/ To: https://phabricator.wikimedia.org/diffusion/PHEX/ This allows external tools to link to repos without knowing their callsign. install extension files in /srv/phab/phabricator/src/extensions
Diff Detail
Event TimelineComment Actions What about also allowing the link to look like https://phabricator.wikimedia.org/r/mediawiki/extensions/ And https://phabricator.wikimedia.org/mediawiki/extensions/ And so on Looking at the diff I think this is for the url to look like gerrit. I think for viewing the repos should look like this too redirecting links Comment Actions Mukunda will have to answer for this one, I wouldn't mind using /r/ for repo paths, but I'll let him answer.
No, we don't want to overload the domain root to potentially conflict with future Phabricator applications.
No, the URLs aren't meant to look like Gerrit. They're meant to just exist as URLs with similar foo/bar/baz repo paths so we can redirect old Gitblit/Gerrit URLs to Phabricator properly. They're not meant to be used as links or accessed directly, really, so there's no requirement for them to be pretty or memorable. Comment Actions @demon I just set it up on phab-01: https://phab-01.wmflabs.org/r/phabricator/phabricator (none of the other repos will redirect to a working repo, since the others aren't set up on phab-01, but they should all redirect to the correct callsign url) Comment Actions Can those patterns be changed to pass query parameters? it'd be cleaner to parse the urls if project was delimited by something other than a slash, since it has slashes in the project path. Example: [gitweb] url = https://git.wikimedia.org type = custom revision = /r/commit/${commit}?project=${project} project = /r/${project} branch = /r/browse/${branch}?project=${project} filehistory = /r/browse/${branch}/${file}?project=${project} linkname = gitblit linkDrafts = false Comment Actions Per discussion earlier, this is fine as is. We'll implement the other requirements as patches on top of this instead of waiting. |