From 4edf240396278c43d97af95f02241f8ac97f6ffd Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Feb 07 2017 10:23:24 +0000 Subject: Fix triggering web-hook notifications via fedmsg upon commit If user turns on the fedmsg hook, we will notify on fedmsg about new commits. The idea being that if the project has web-hooks activated as well, we should also send web-hook notifications. Except that since the redis connection wasn't set, we were not doing it. With this commit, we fix that by passing the redis connection around. --- diff --git a/pagure/hooks/files/fedmsg_hook.py b/pagure/hooks/files/fedmsg_hook.py index b5b4a3b..0497b51 100755 --- a/pagure/hooks/files/fedmsg_hook.py +++ b/pagure/hooks/files/fedmsg_hook.py @@ -15,6 +15,7 @@ if 'PAGURE_CONFIG' not in os.environ \ and os.path.exists('/etc/pagure/pagure.cfg'): os.environ['PAGURE_CONFIG'] = '/etc/pagure/pagure.cfg' + import pagure import pagure.lib.git @@ -91,4 +92,5 @@ for line in sys.stdin.readlines(): repo=project.to_json(public=True) if not isinstance(project, basestring) else project, ), + redis=pagure.lib.REDIS, )