Skip to content

Commit 363b0af

Browse files
author
Jaume Florez
committed
Allow to configure hooks path
With this change we split the repositori of hooks server and our hooks
1 parent c6364d5 commit 363b0af

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

webhooks.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ def index():
4242
"""
4343

4444
path = normpath(abspath(dirname(__file__)))
45-
hooks = join(path, 'hooks')
4645

4746
# Only POST is implemented
4847
if request.method != 'POST':
@@ -52,6 +51,8 @@ def index():
5251
with open(join(path, 'config.json'), 'r') as cfg:
5352
config = loads(cfg.read())
5453

54+
hooks = config.get('hooks_path', join(path, 'hooks'))
55+
5556
# Allow Github IPs only
5657
if config.get('github_ips_only', True):
5758
src_ip = ip_address(

0 commit comments

Comments
 (0)