mirror of
https://github.com/quay/quay.git
synced 2025-07-30 07:43:13 +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:
@ -159,10 +159,9 @@ class GithubBuildTrigger(BuildTriggerHandler):
|
|||||||
Returns an authenticated client for talking to the GitHub API.
|
Returns an authenticated client for talking to the GitHub API.
|
||||||
"""
|
"""
|
||||||
return Github(
|
return Github(
|
||||||
self.auth_token,
|
|
||||||
base_url=github_trigger.api_endpoint(),
|
base_url=github_trigger.api_endpoint(),
|
||||||
client_id=github_trigger.client_id(),
|
login_or_token=self.auth_token if self.auth_token else github_trigger.client_id(),
|
||||||
client_secret=github_trigger.client_secret(),
|
password=None if self.auth_token else github_trigger.client_secret(),
|
||||||
timeout=5,
|
timeout=5,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user