diff options
author | Oliver Poignant <oliver@poignant.se> | 2015-08-19 08:44:51 +0200 |
---|---|---|
committer | Oliver Poignant <oliver@poignant.se> | 2015-08-19 08:44:51 +0200 |
commit | 00c4b783ff5c85a5904ada215c8a59f31b5834ce (patch) | |
tree | b38efcbcdeffc294bbec58b5f3adc55b1f0f1c2a /GitAutoDeploy.py | |
parent | 79fc7b9a6f0c38c7922757a5307c955fc27fdce6 (diff) | |
download | Git-Auto-Deploy-00c4b783ff5c85a5904ada215c8a59f31b5834ce.zip Git-Auto-Deploy-00c4b783ff5c85a5904ada215c8a59f31b5834ce.tar.gz Git-Auto-Deploy-00c4b783ff5c85a5904ada215c8a59f31b5834ce.tar.bz2 |
Fixed bug in bitbucket repo URLs
Diffstat (limited to 'GitAutoDeploy.py')
-rwxr-xr-x | GitAutoDeploy.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/GitAutoDeploy.py b/GitAutoDeploy.py index 5420774..e1756ae 100755 --- a/GitAutoDeploy.py +++ b/GitAutoDeploy.py @@ -171,7 +171,11 @@ class WebhookRequestHandler(BaseHTTPRequestHandler): if 'full_name' in data['repository']: repo_urls.append('git@bitbucket.org:%s.git' % data['repository']['full_name']) - repo_urls.append('https://oliverpoignant@bitbucket.org/%s.git' % data['repository']['full_name']) + + # FIXME: Need to add a 'bitbucket_username' option in the repo config section to allow for + # non-repo-owners to deploy using web hooks + bitbucket_username = data['repository']['owner']['username'] + repo_urls.append('https://%s@bitbucket.org/%s.git' % (bitbucket_username, data['repository']['full_name'])) else: print "ERROR - Unable to recognize request origin. Don't know how to handle the request." |