Make Siteinfo API returns autoconfirmed information for the site.
Description
Details
Related Objects
Event Timeline
Depends on the request.
If it's in the "Needs details or plan" column of the MediaWiki-Action-API workboard, that usually means discussion of some sort is needed. That could be discussion to determine if the change is actually a good idea, or just discussion to figure out how to actually do it.
If it's in "Needs Code", that normally means someone should write the code and then try to get me to review it. Or hope I find it interesting/useful enough to write the code myself.
I pushed a patch.
For default installation, the API display:
{ "batchcomplete": "", "query": { "autopromote": { "autoconfirmed": { "conditions": [ [ "&", [ 1, 0 ], [ 2, 0 ] ] ] } } } }
Is this data structure feasible?
Change 444335 had a related patch set uploaded (by 星耀晨曦; owner: 星耀晨曦):
[mediawiki/core@master] Make logical operators recognized in $wgAutopromote public
Change 444335 had a related patch set uploaded (by 沈澄心; author: 星耀晨曦):
[mediawiki/core@master] Make logical operators recognized in $wgAutopromote public
Declining this task because:
- T196059 was created because of T189286, however, T189286 has been resolved without it. We therefore can no longer find the relevance of this task.
- The current implementation in XTools pulls InitialiseSettings.php.txt and parses it using regexes. An alternative might be to get this data in json format from https://noc.wikimedia.org/wiki.php.
- The json appears to be generated directly within that php page, so (unless we're missing something) there's no way to directly pull just the json for the config values of interest - they'd have to be extracted from the html. But that might be preferred to the current regex parsing
- It might also be possible to make those individual variable values available as raw json, by adding that functionality to the noc.wikimedia.org site (its code lives within the mediawiki-config repository). Unsure who is responsible for that particular bit of code - RelEng maybe? Doing this would justify a separate task and a conversation on-task with the maintaining team.
- It might also be possible to directly add logging of autoconfirmation assignment to mediawiki itself, so that autoconfirmation appears in Special:Log. However, that would be a significant number of database writes, and would therefore need an impact analysis to determine if it were actually feasible, and if usage of the feature would be beneficial enough to justify the additional load.
@codebug: Feel free to set the status of this task to "Declined" via the Add Action... → Change Status dropdown if nobody should ever work on this (and potentially update the connected patches in Gerrit accordingly). Thanks.
Re-opening.
Based on T189286#4039311, it has been fixed by scraping config files. This is not very reliable or anything else.
Exposing this through the API makes a lot more sense.
Change 444335 merged by jenkins-bot:
[mediawiki/core@master] Make logical operators recognized in $wgAutopromote public
Change 992515 had a related patch set uploaded (by Reedy; author: Reedy):
[mediawiki/core@master] ApiSiteInfo: Add siprop=autopromoteonce
Change 436772 merged by jenkins-bot:
[mediawiki/core@master] ApiSiteInfo: Add siprop=autopromote to return $wgAutopromote data
Change 992515 merged by jenkins-bot:
[mediawiki/core@master] ApiSiteInfo: Add siprop=autopromoteonce