From 97b4248a690f5d8ede84778d06215811f99247a2 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Tue, 12 Sep 2017 16:13:13 -0600 Subject: [PATCH] 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 --- tests/base.py | 3 +-- zuul/driver/github/githubconnection.py | 9 +++------ 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/tests/base.py b/tests/base.py index fcc5e841b4..c159865bae 100755 --- a/tests/base.py +++ b/tests/base.py @@ -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=[], diff --git a/zuul/driver/github/githubconnection.py b/zuul/driver/github/githubconnection.py index fca36c824d..3d0eb37951 100644 --- a/zuul/driver/github/githubconnection.py +++ b/zuul/driver/github/githubconnection.py @@ -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