From 7acddaeca5cc72d57b74a84870c263db0294b128 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Wed, 20 May 2020 11:23:28 +0200 Subject: [PATCH] git/hooks: adjusts the post-receive hooks so it loads the correct fedora-messaging config Signed-off-by: Pierre-Yves Chibon --- roles/git/hooks/files/post-receive-fedora-messaging | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/roles/git/hooks/files/post-receive-fedora-messaging b/roles/git/hooks/files/post-receive-fedora-messaging index b8892002c1..a2dad7cf33 100644 --- a/roles/git/hooks/files/post-receive-fedora-messaging +++ b/roles/git/hooks/files/post-receive-fedora-messaging @@ -11,9 +11,14 @@ from collections import defaultdict import pygit2 +import fedora_messaging.config import fedora_messaging.api import fedora_messaging.exceptions +fedora_messaging.config.conf.load_config( + '/etc/fedora-messaging/git-hooks-messaging.toml') + + # Use $GIT_DIR to determine where this repo is. abspath = os.path.abspath(os.environ['GIT_DIR']) if "/requests/" in abspath: