summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWill Holland <william.holland@codethink.co.uk>2015-09-21 15:35:42 +0100
committerWill Holland <william.holland@codethink.co.uk>2015-09-21 15:35:42 +0100
commit49d253591b322e8e8ec923c9a4222e412973592f (patch)
treecd06b9b1e5d333fad5cf33f38e1181e50977dd5e
parentb1027cb0916e6414a361075485943a84d98c182c (diff)
downloadorchestration-49d253591b322e8e8ec923c9a4222e412973592f.tar.gz
Fix taking the wrong url as repo_name
-rw-r--r--source/bottlerock.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/source/bottlerock.py b/source/bottlerock.py
index 428f10e..cdf5c66 100644
--- a/source/bottlerock.py
+++ b/source/bottlerock.py
@@ -69,8 +69,13 @@ def missing_property_response(property):
@post('/repo_update')
def repo_update():
+ import re
print request.json
- repo_name = request.json['urls'][0]
+ repo_name = "no repo name"
+ for url in request.json['urls']:
+ if re.match('^ssh',url):
+ repo_name = url
+ break
changes = request.json['changes']
for change in changes:
ref = change['ref']