Module:Code review entry

return { dl = function ( d ) local link, desc, done, entry, isdone, origurl, matches, patchnum

link = d.args[1] desc = d.args[2] done = d.args[3] entry = '; ' isdone = ( done == 'done' )

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

if matches ~= nil then link = 'Gerrit change ' .. matches .. '' end

if done == 'done' then entry = entry .. ' '		end

entry = entry .. link

if isdone then entry = entry .. ' '		end

entry = entry .. ' : '		if isdone then entry = entry .. ' '		end entry = entry .. desc if isdone then entry = entry .. ' '		end

return entry end }