From 675e1799d8ae07e84ab79b7c7d2d3b8a6445f3d5 Mon Sep 17 00:00:00 2001 From: Jimmy Zelinskie Date: Mon, 21 Dec 2015 13:47:17 -0500 Subject: [PATCH] remove hardcoded host in gitlab get_repository_url --- buildtrigger/gitlabhandler.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/buildtrigger/gitlabhandler.py b/buildtrigger/gitlabhandler.py index 8c1dba555..b2f0bbf28 100644 --- a/buildtrigger/gitlabhandler.py +++ b/buildtrigger/gitlabhandler.py @@ -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):