mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-26 12:21:26 -07:00
* 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:
parent
ec78558559
commit
9d93760564
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