Feature summary:
The Wikimedia Phabricator Conduit API user.mediawikiquery could be improved to support the official MediaWiki.org nickname variants, that are:
- the nickname can have underscores
- the nickname can have the first letter lowercase
Here some tests I've conducted:
| Nick | Test | Currently works in user.mediawikiquery |
|---|---|---|
| Valerio Bozzolan | https://meta.wikimedia.org/wiki/User:Valerio%20Bozzolan | ✅ it works because is uppercase and with spaces |
| Valerio_Bozzolan | https://meta.wikimedia.org/wiki/User:Valerio_Bozzolan | ❌ fails because has an underscore |
| valerio_Bozzolan | https://meta.wikimedia.org/wiki/User:valerio_Bozzolan | ❌ fails because first letter is lowercase and has an underscore |
| valerio Bozzolan | https://meta.wikimedia.org/wiki/User:valerio%20Bozzolan | ❌ fails because first letter is lowercase |
See the currently working API call:
echo '{"names": [ "Valerio Bozzolan" ] }' | arc call-conduit --conduit-uri https://phabricator.wikimedia.org/ -- user.mediawikiquerySee the API call which is expected to work too, but currently leading to no results as it has an underscore instead of spaces:
echo '{"names": [ "Valerio_Bozzolan" ] }' | arc call-conduit --conduit-uri https://phabricator.wikimedia.org/ -- user.mediawikiqueryUse case(s):
Allow users to specify a perfectly valid username and get expected results, instead of receiving this confusing error:
ERR-INVALID-PARAMETER Unknown or missing mediawiki names: Valerio_Bozzolan
This would simplify API consumers, and simplify future API consumers like https://techcontribs.toolforge.org/
Benefits (why should this be implemented?):
- Be more user friendly for API newcomers, especially for users with knowledge about MediaWiki.org
- Less custom business logics scattered in API consumers to get results
Code Exploration
The code is here, substantially wrote in 2016 and originally developed during T137001: