liquid_feedback_frontend
diff env/lf4rcs/render_draft_reference.lua @ 1219:30523f31b186
Added lf4rcs module and example configuration
author | bsw |
---|---|
date | Mon Nov 30 19:40:38 2015 +0100 (2015-11-30) |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/env/lf4rcs/render_draft_reference.lua Mon Nov 30 19:40:38 2015 +0100 1.3 @@ -0,0 +1,12 @@ 1.4 +function lf4rcs.render_draft_reference(draft, wrapper) 1.5 + local repository, path, url = lf4rcs.get_config(draft.initiative.issue.area.unit) 1.6 + if not (config.lf4rcs[repository] and config.lf4rcs[repository].render_draft_reference) then 1.7 + error("Unsupported repository type") 1.8 + end 1.9 + if draft.external_reference then 1.10 + wrapper(function() 1.11 + config.lf4rcs[repository].render_draft_reference(url, draft) 1.12 + end) 1.13 + end 1.14 +end 1.15 +