Bugfix: PyGithub does not support explicit port in base_url (#2204) (#2215)

* Bugfix: PyGithub does not support explicit port in base_url

* Fix unit tests

* Fix unit tests

* Added changelog

* Update changelogs/fragments/2204-github_repo-fix-baseurl_port.yml

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
(cherry picked from commit 8eb2331aea)

Co-authored-by: Álvaro Torres Cogollo <atorrescogollo@gmail.com>
This commit is contained in:
patchback[bot] 2021-04-09 12:16:29 +02:00 committed by GitHub
parent ec78558559
commit 9d93760564
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 21 additions and 19 deletions

View file

@ -121,9 +121,9 @@ except Exception:
def authenticate(username=None, password=None, access_token=None):
if access_token:
return Github(base_url="https://api.github.com:443", login_or_token=access_token)
return Github(base_url="https://api.github.com", login_or_token=access_token)
else:
return Github(base_url="https://api.github.com:443", login_or_token=username, password=password)
return Github(base_url="https://api.github.com", login_or_token=username, password=password)
def create_repo(gh, name, organization=None, private=False, description='', check_mode=False):