use app.gitlab_trigger for config data
This includes defaults and makes the structure of the Gitlab trigger parallel the GitHub trigger.
This commit is contained in:
parent
675e1799d8
commit
bcea268fcb
2 changed files with 11 additions and 9 deletions
|
@ -95,7 +95,7 @@ class GithubOAuthConfig(OAuthConfig):
|
|||
return [org.lower() for org in allowed]
|
||||
|
||||
def get_public_url(self, suffix):
|
||||
return '%s%s' % (self._endpoint(), suffix)
|
||||
return urlparse.urljoin(self._endpoint(), suffix)
|
||||
|
||||
def _endpoint(self):
|
||||
endpoint = self.config.get('GITHUB_ENDPOINT', 'https://github.com')
|
||||
|
@ -226,6 +226,12 @@ class GitLabOAuthConfig(OAuthConfig):
|
|||
endpoint = endpoint + '/'
|
||||
return endpoint
|
||||
|
||||
def api_endpoint(self):
|
||||
return self._endpoint()
|
||||
|
||||
def get_public_url(self, suffix):
|
||||
return urlparse.urljoin(self._endpoint(), suffix)
|
||||
|
||||
def service_name(self):
|
||||
return 'GitLab'
|
||||
|
||||
|
|
Reference in a new issue