Skip to content
This repository has been archived by the owner on Dec 13, 2024. It is now read-only.

Commit

Permalink
Send token with close requests
Browse files Browse the repository at this point in the history
  • Loading branch information
gingershaped committed Dec 8, 2023
1 parent cdacd60 commit 368061d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions vyxalbot2/commands/se.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,14 +205,16 @@ async def issueCloseCommand(self, event: EventInfo, repo: str, num: int, body: s
try:
await self.common.ghClient.gh.post(
f"/repos/{self.common.privateConfig['account']}/{repo}/issues/{num}/comments",
data={"body": body}
data={"body": body},
oauth_token = await self.common.ghClient.appToken()
)
except BadRequest as e:
yield f"Failed to send comment: {e.args}"
try:
await self.common.ghClient.gh.patch(
f"/repos/{self.common.privateConfig['account']}/{repo}/issues/{num}",
data={"state": "closed"}
data={"state": "closed"},
oauth_token = await self.common.ghClient.appToken()
)
except BadRequest as e:
yield f"Failed to close issue: {e.args}"
Expand Down

0 comments on commit 368061d

Please sign in to comment.