diff options
author | Tobias Henkel <tobias.henkel@bmw.de> | 2020-06-10 12:45:15 +0200 |
---|---|---|
committer | Paul Belanger <pabelanger@redhat.com> | 2020-07-21 15:35:30 -0400 |
commit | cd2ef81d260ede9e8222cc600d072255f4cf68a0 (patch) | |
tree | 796aae69cfc6233f9ed33ba43e1149f0340fd893 | |
parent | 5d911942537e30960885dd87bc6412d20620ec2f (diff) | |
download | zuul-cd2ef81d260ede9e8222cc600d072255f4cf68a0.tar.gz |
Update access token url
The currently used endpoint
/installations/:installation_id/access_tokens for getting access
tokens is deprecated since a long time and will be removed [1]. Thus
replace it by the current one
/app/installations/:installation_id/access_tokens.
[1] https://developer.github.com/changes/2020-04-15-replacing-create-installation-access-token-endpoint/
Change-Id: I5415472dd68b163d3b980a514b367f0615dbb0bc
(cherry picked from commit ea97b9f2e829331b0af0a6f0904cba691628c1f5)
-rw-r--r-- | zuul/driver/github/githubconnection.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/zuul/driver/github/githubconnection.py b/zuul/driver/github/githubconnection.py index a054d9e49..5f7ebccb7 100644 --- a/zuul/driver/github/githubconnection.py +++ b/zuul/driver/github/githubconnection.py @@ -997,8 +997,8 @@ class GithubConnection(BaseConnection): if ((not expiry) or (not token) or (now >= expiry)): headers = self._get_app_auth_headers() - url = "%s/installations/%s/access_tokens" % (self.base_url, - installation_id) + url = "%s/app/installations/%s/access_tokens" % ( + self.base_url, installation_id) response = requests.post(url, headers=headers, json=None) response.raise_for_status() |