from cumulusci.core.config import BaseProjectConfig config = BaseProjectConfig() # instantiate the BaseProjectConfig class github_api = config.get_github_api() # get authenticated GitHub API client
from cumulusci.core.config import BaseProjectConfig config = BaseProjectConfig() # instantiate the BaseProjectConfig class github_api = config.get_github_api() # create a new repository repo_data = { "name": "my_new_repo", "description": "A new repository created using the GitHub API" } res = github_api.post("repos", repo_data)In this example, we again create a new instance of the BaseProjectConfig class and call the get_github_api() method to obtain an authenticated GitHub API client. We then use the client to create a new repository on GitHub using the POST method. Package library: CumulusCI.