Use oauth token to create GitHub project if available
Make sure you have repo/public_repo and write:org scopes. Change-Id: I773331d2b0051865d783af5024fac1490c64c782
This commit is contained in:
parent
a2d4e2f92f
commit
6d97045c8c
|
@ -276,7 +276,9 @@ def create_github_project(
|
||||||
secure_config = ConfigParser.ConfigParser()
|
secure_config = ConfigParser.ConfigParser()
|
||||||
secure_config.read(github_secure_config)
|
secure_config.read(github_secure_config)
|
||||||
|
|
||||||
# Project creation doesn't work via oauth
|
if secure_config.has_option("github", "oauth_token"):
|
||||||
|
ghub = github.Github(secure_config.get("github", "oauth_token"))
|
||||||
|
else:
|
||||||
ghub = github.Github(secure_config.get("github", "username"),
|
ghub = github.Github(secure_config.get("github", "username"),
|
||||||
secure_config.get("github", "password"))
|
secure_config.get("github", "password"))
|
||||||
orgs = ghub.get_user().get_orgs()
|
orgs = ghub.get_user().get_orgs()
|
||||||
|
|
Loading…
Reference in New Issue