contrib/phabricator.py
changeset 36543 7b74afec6772
parent 35722 f18ba40d792f
child 36795 4397909f82d3
--- a/contrib/phabricator.py	Sun Feb 25 14:28:32 2018 +0900
+++ b/contrib/phabricator.py	Sun Feb 25 13:40:46 2018 +0900
@@ -868,11 +868,12 @@
 
 templatekeyword = registrar.templatekeyword()
 
-@templatekeyword('phabreview')
-def template_review(repo, ctx, revcache, **args):
+@templatekeyword('phabreview', requires={'ctx'})
+def template_review(context, mapping):
     """:phabreview: Object describing the review for this changeset.
     Has attributes `url` and `id`.
     """
+    ctx = context.resource(mapping, 'ctx')
     m = _differentialrevisiondescre.search(ctx.description())
     if m:
         return {