summaryrefslogtreecommitdiffstats
path: root/gitautodeploy/parsers/common.py
diff options
context:
space:
mode:
Diffstat (limited to 'gitautodeploy/parsers/common.py')
-rw-r--r--gitautodeploy/parsers/common.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/gitautodeploy/parsers/common.py b/gitautodeploy/parsers/common.py
index 1b40b73..b194062 100644
--- a/gitautodeploy/parsers/common.py
+++ b/gitautodeploy/parsers/common.py
@@ -6,7 +6,7 @@ class WebhookRequestParser(object):
def __init__(self, config):
self._config = config
- def get_matching_repo_configs(self, urls):
+ def get_matching_repo_configs(self, urls, action):
"""Iterates over the various repo URLs provided as argument (git://,
ssh:// and https:// for the repo) and compare them to any repo URL
specified in the config"""
@@ -21,7 +21,10 @@ class WebhookRequestParser(object):
elif 'url_without_usernme' in repo_config and repo_config['url_without_usernme'] == url:
configs.append(repo_config)
+ if len(configs) == 0:
+ action.log_warning('The URLs references in the webhook did not match any repository entry in the config. For this webhook to work, make sure you have at least one repository configured with one of the following URLs; %s' % ', '.join(urls))
+
return configs
- def validate_request(self, request_headers, repo_configs):
+ def validate_request(self, request_headers, repo_configs, action):
return True \ No newline at end of file