Closed
Description
As opposed to requiring the installation ID, if you have a valid Installation
you should be able to use it for authentication. It's a small thing, but I like the API of this.
Proposed:
async def create_comment(repo_full_name: str):
installation = await Installation.objects.aget(repositories__full_name=repo_full_name)
async with AsyncGitHubAPI(installation=installation) as gh:
await gh.post(
f"/repos/{repo_full_name}/issues/1/comments",
data={"body": "Hello!"}
)
Current:
async def create_comment(repo_full_name: str):
installation = await Installation.objects.aget(repositories__full_name=repo_full_name)
async with AsyncGitHubAPI(installation_id=installation.installation_id) as gh:
await gh.post(
f"/repos/{repo_full_name}/issues/1/comments",
data={"body": "Hello!"}
)
Metadata
Metadata
Assignees
Labels
No labels