consolidate everything into one GitHub trigger

This commit is contained in:
Jimmy Zelinskie 2015-03-19 17:12:27 -04:00
parent 80ae3fd310
commit f6f93e9079
6 changed files with 42 additions and 426 deletions

View file

@ -248,8 +248,6 @@ def github_oauth_attach():
@callback.route('/github/callback/trigger/<path:repository>', methods=['GET'])
@callback.route('/github/callback/trigger/<path:repository>/__new', methods=['GET'])
@callback.route('/github/callback/trigger/<path:repostiory>/__git', methods=['GET'])
@callback.route('/github/callback/trigger/<path:repostiory>/__git/__new', methods=['GET'])
@route_show_if(features.GITHUB_BUILD)
@require_session_login
@parse_repository_name
@ -262,8 +260,7 @@ def attach_github_build_trigger(namespace, repository):
msg = 'Invalid repository: %s/%s' % (namespace, repository)
abort(404, message=msg)
service_name = 'github-git' if '__git' in request.url else 'github'
trigger = model.create_build_trigger(repo, service_name, token, current_user.db_user())
trigger = model.create_build_trigger(repo, 'github', token, current_user.db_user())
# TODO(jschorr): Remove once the new layout is in place.
admin_path = '%s/%s/%s' % (namespace, repository, 'admin')