Accidental refactor, split out legacy.py into separate sumodules and update all call sites.
This commit is contained in:
parent
2109d24483
commit
3efaa255e8
92 changed files with 4458 additions and 4269 deletions
|
@ -9,7 +9,6 @@ from auth.permissions import AdministerRepositoryPermission
|
|||
from data import model
|
||||
from endpoints.common import route_show_if
|
||||
from util.http import abort
|
||||
from util.names import parse_repository_name
|
||||
|
||||
import features
|
||||
|
||||
|
@ -40,14 +39,15 @@ def attach_gitlab_build_trigger():
|
|||
msg = 'Could not exchange token. It may have expired.'
|
||||
abort(404, message=msg)
|
||||
|
||||
repo = model.get_repository(namespace, repository)
|
||||
repo = model.repository.get_repository(namespace, repository)
|
||||
if not repo:
|
||||
msg = 'Invalid repository: %s/%s' % (namespace, repository)
|
||||
abort(404, message=msg)
|
||||
|
||||
trigger = model.create_build_trigger(repo, 'gitlab', token, current_user.db_user())
|
||||
trigger = model.build.create_build_trigger(repo, 'gitlab', token, current_user.db_user())
|
||||
repo_path = '%s/%s' % (namespace, repository)
|
||||
full_url = '%s%s%s' % (url_for('web.repository', path=repo_path), '?tab=builds&newtrigger=', trigger.uuid)
|
||||
full_url = '%s%s%s' % (url_for('web.repository', path=repo_path), '?tab=builds&newtrigger=',
|
||||
trigger.uuid)
|
||||
|
||||
logger.debug('Redirecting to full url: %s', full_url)
|
||||
return redirect(full_url)
|
||||
|
|
Reference in a new issue