Topic on Project:Village Pump

Interwiki prefix to link source files in MediaWiki core

5
Push-f (talkcontribs)

I am working on a client library for the MediaWiki action API and would like to always link the source code of the respective PHP class, so for example:

# https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/core/+/refs/heads/master/includes/api/ApiParamInfo.php

However I would like these links to be less verbose and future proof in the case the code is migrated from Gerrit to GitLab in the future, so I would ask an administrator of this wiki to please create a core interwiki prefix at Special:Interwiki/add with the Forward flag enabled and the URL https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/core/+/refs/heads/master$1, so that I could link PHP classes within MediaWiki core as follows:

# https://mediawiki.org/wiki/core:/includes/api/ApiParamInfo.php

Thank you!

Legoktm (talkcontribs)
Push-f (talkcontribs)

The classes in includes/api/ are renamed only very seldomly, e.g. ApiParamInfo.php has been named that way since it was created in 2008, which is now nearly 15 years ago.

I am well aware that these links will break if the file is renamed but there's really no way around that ... I just want URLs that are more readable and web frontend agnostic ... so can you create that interwiki prefix for me?

Legoktm (talkcontribs)

It'll be renamed as part of T166010 (specifically the api folder to Api). I think it's more likely that we'll set up redirects from Gerrit URLs to GitLab ones, like we did when the GitBlit viewer was shut down, and with Special:CodeReview URLs.

In any case, I can't add the interwiki prefix, on Wikimedia wikis they're managed centrally, see m:Interwiki map.

Push-f (talkcontribs)