Jump to content

Module:Gerrit dashboard/MarkTraceur/Review queue

From mediawiki.org
Module documentation
local dashboard = require( 'Module:Gerrit dashboard' )
local link_to_dashboard = dashboard._link_to_dashboard

local projects = {}

local dashboard_def = {}

local add_project = function ( proj, limit, filestr )
	local projobj = {
		{ 'NOT', { 'owner', 'MarkTraceur' } },
		{ 'project', proj },
		{ 'status', 'open' },
		{ 'limit', limit or 10 }
	}

	if filestr ~= nil then
		table.insert( projobj, { 'file', filestr } )
	end

	table.insert( dashboard_def, { proj, projobj } )
	table.insert( projects, proj )
end

local add_ext = function ( ext, limit )
	add_project( 'mediawiki/extensions/' .. ext, limit or 10 )
end

add_ext( 'BetaFeatures' )
add_ext( 'MultimediaViewer' )
add_ext( 'CommonsMetadata' )
add_ext( 'UploadWizard' )
add_ext( 'EtherEditor' )

return {
	link = function ( frame )
		return link_to_dashboard( dashboard_def, 'MarkTraceur', 'MarkTraceur\'s personal CR dashboard on Gerrit' ) .. ' <sup>[[Module:Gerrit dashboard/MarkTraceur/Review queue|(source)]]</sup>'
	end
}