endpoints.trigger: more logical comment blocks

This commit is contained in:
Jimmy Zelinskie 2015-04-23 14:02:05 -04:00
parent 352371431b
commit aa1658f0c7

View file

@ -203,13 +203,11 @@ class GithubBuildTrigger(BuildTrigger):
msg = 'Unable to add deploy key to repository: %s' % new_build_source msg = 'Unable to add deploy key to repository: %s' % new_build_source
raise TriggerActivationException(msg) raise TriggerActivationException(msg)
# Create a webhook config. # Add the webhook to the GitHub repository.
webhook_config = { webhook_config = {
'url': standard_webhook_url, 'url': standard_webhook_url,
'content_type': 'json', 'content_type': 'json',
} }
# Add the webhook to the GitHub repository.
try: try:
hook = gh_repo.create_hook('web', webhook_config) hook = gh_repo.create_hook('web', webhook_config)
config['hook_id'] = hook.id config['hook_id'] = hook.id