1
0
mirror of https://github.com/quay/quay.git synced 2025-07-11 06:41:51 +03:00

Change GitHub calls to pass client_id and secret in the Auth header

This is a required change, as GitHub is deprecating the query parameters in a few months. See https://developer.github.com/changes/2020-02-10-deprecating-auth-through-query-param/ for details.

Fixes https://issues.redhat.com/browse/PROJQUAY-268
This commit is contained in:
Joseph Schorr
2020-02-19 13:21:39 -05:00
parent 5be95a9b7d
commit 4a6cacb06d

View File

@ -159,10 +159,9 @@ class GithubBuildTrigger(BuildTriggerHandler):
Returns an authenticated client for talking to the GitHub API.
"""
return Github(
self.auth_token,
base_url=github_trigger.api_endpoint(),
client_id=github_trigger.client_id(),
client_secret=github_trigger.client_secret(),
login_or_token=self.auth_token if self.auth_token else github_trigger.client_id(),
password=None if self.auth_token else github_trigger.client_secret(),
timeout=5,
)