Drop use_app boolean from github client
There are no more functions that would not use app, so remove the option. Change-Id: I49f0c0836a856c30e7df38c18e3fd5d674e37374 Signed-off-by: Jesse Keating <omgjlk@us.ibm.com>
This commit is contained in:
parent
c91b3dc4a7
commit
97b4248a69
|
@ -1012,8 +1012,7 @@ class FakeGithubConnection(githubconnection.GithubConnection):
|
|||
|
||||
def getGithubClient(self,
|
||||
project=None,
|
||||
user_id=None,
|
||||
use_app=True):
|
||||
user_id=None):
|
||||
return self.github_client
|
||||
|
||||
def openFakePullRequest(self, project, branch, subject, files=[],
|
||||
|
|
|
@ -553,13 +553,10 @@ class GithubConnection(BaseConnection):
|
|||
|
||||
def getGithubClient(self,
|
||||
project=None,
|
||||
user_id=None,
|
||||
use_app=True):
|
||||
user_id=None):
|
||||
# if you're authenticating for a project and you're an integration then
|
||||
# you need to use the installation specific token. There are some
|
||||
# operations that are not yet supported by integrations so
|
||||
# use_app lets you use api_key auth.
|
||||
if use_app and project and self.app_id:
|
||||
# you need to use the installation specific token.
|
||||
if project and self.app_id:
|
||||
github = self._createGithubClient()
|
||||
github.login(token=self._get_installation_key(project, user_id))
|
||||
github._zuul_project = project
|
||||
|
|
Loading…
Reference in New Issue