Module:Code review entry

local Gerrit = require( 'Module:Gerrit' )

local description = function ( desc, done ) local isdone = ( done == 'done' ) local entry = ''

if isdone then entry = entry .. ' '	end

entry = entry .. desc

if isdone then entry = entry .. ' '	end

return entry end

local linkhead = function ( link, done ) local isdone = ( done == 'done' ) local entry = ''

if isdone then entry = entry .. ' '	end

entry = entry .. link

if isdone then entry = entry .. ' '	end

return entry end

local dl = function ( link, desc, done ) local entry = '; '

origurl = link matches = string.match( origurl, 'https?%:%/%/gerrit%.wikimedia%.org%/r%/(%d+)' )

if matches ~= nil then link = Gerrit._link_to_gerrit_number( matches ) end

return '; ' .. linkhead( link, done ) .. ' : ' .. description( desc, done ) end

return { _dl = dl,

dl = function ( d ) link = d.args[1] desc = d.args[2] done = d.args[3]

return dl( d.args[1], d.args[2], d.args[3] ) end }