mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-25 20:01:25 -07:00
Bugfix: PyGithub does not support explicit port in base_url (#2204)
* 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>
This commit is contained in:
parent
f0b7c6351e
commit
8eb2331aea
3 changed files with 21 additions and 19 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue