remove hardcoded host in gitlab get_repository_url

This commit is contained in:
Jimmy Zelinskie 2015-12-21 13:47:17 -05:00 committed by Jimmy Zelinskie
parent cca95ac583
commit 675e1799d8

View file

@ -318,7 +318,11 @@ class GitLabBuildTrigger(BuildTriggerHandler):
return None
def get_repository_url(self):
return 'https://gitlab.com/%s' % self.config['build_source']
# Get the host and remove a trailing slash.
host = app.config.get('GITLAB_TRIGGER_CONFIG', {}).get('GITLAB_ENDPOINT', '')
host = host[0:-1] if host[-1] == '/' else host
return '%s/%s' % (host, self.config['build_source'])
@_catch_timeouts
def lookup_user(self, email):