Module:Maintainers

-- Component information table -- local stewards = { -- Format: --	-- [key]: Lowercase steward ID. (used from 'maintainers' table below) -- name: Name of steward, linked. (optional) -- irc: Name of Freenode IRC channel, without leading hash. (optional) --	["anti-harassment"] = { name = "Anti-Harassment Tools", },	["core-platform-team"] = { name = "Core Platform Team", irc = "mediawiki-core", },	["performance-team"] = { name = "Performance Team", irc = "wikimedia-perf", } } local maintainers = { -- Format: --	-- [key]: Lowercase component ID. (used from Template:Component) -- steward: Key to 'stewards' lookup table above. (optional) -- phab: Name of Phabricator tag. (optional) --

-- MediaWiki core components ["mediawiki-api"] = { steward = "core-platform-team", phab = "mediawiki-api", },	["mediawiki-auth"] = { steward = "core-platform-team", phab = "mediawiki-auth", },	["mediawiki-blocks"] = { steward = "anti-harassment", phab = "mediawiki-blocks", },	["mediawiki-cache"] = { steward = "core-platform-team", phab = "mediawiki-cache", },	["mediawiki-comment-store"] = { steward = "core-platform-team", phab = "mediawiki-comment-store", },	["mediawiki-configuration"] = { steward = "core-platform-team", phab = "mediawiki-configuration", },	["mediawiki-jobqueue"] = { steward = "core-platform-team", phab = "mediawiki-jobqueue", },	["mediawiki-redirects"] = { phab = "mediawiki-redirects", },	["mediawiki-interface"] = { phab = "mediawiki-interface", },

-- MediaWiki extensions and skins ["navigationtiming"] = { steward = "performance-team", phab = "MediaWiki-extensions-NavigationTiming", },

-- Libraries ["cdb"] = { steward = "performance-team", phab = "wikimedia-cdb", },	["relpath"] = { steward = "performance-team", phab = "mediawiki-resourceloader", },	["resourceloader"] = { steward = "performance-team", phab = "mediawiki-resourceloader", },	["runningstat"] = { steward = "performance-team", phab = "runningstat", },	["waitconditionloop"] = { steward = "performance-team", phab = "waitconditionloop", },	["wrappedstring"] = { steward = "performance-team", phab = "WrappedString", }, }

-- Lua methods to access the above information.

local function get_steward_link( key ) local steward = maintainers[ key ] and maintainers[ key ].steward or "?" local link = stewards[ steward ] and stewards[ steward ].name or "?" return link end

local function get_irc_channel( key ) local steward = maintainers[ key ] and maintainers[ key ].steward or "?" return stewards[ steward ] and stewards[ steward ].irc or nil end

-- Exported lua module

local p = {} function p.link_stewardship( frame ) local key = string.lower( frame.args[1] ) return get_steward_link( key ) end function p.link_issues( frame ) local key = string.lower( frame.args[1] ) local phab = maintainers[ key ] and maintainers[ key ].phab if phab then return "[https://phabricator.wikimedia.org/tag/" .. mw.uri.encode( phab ) .. "/ Phabricator]" end return "" end function p.info( frame ) local key = string.lower( frame.args[1] ) local line = "* Maintained by " .. get_steward_link( key ) .. "."	local irc_channel = get_irc_channel( key ) if irc_channel then -- Invoke line = line .. "\n* Live chat (IRC): " .. frame:expandTemplate{ title = 'irc', args = { irc_channel } } end local phab = maintainers[ key ] and maintainers[ key ].phab if phab then line = line .. "\n* Issue tracker: [https://phabricator.wikimedia.org/tag/" .. mw.uri.encode( phab ) .. "/ Phabricator]" .. " (mw.uri.encode( phab )			.. " Report an issue)" end return line end return p