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

Commit

Permalink
Add error checking
Browse files Browse the repository at this point in the history
  • Loading branch information
EstebanDalelR committed Jun 21, 2023
1 parent 523bc2f commit e408486
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pages/api/actions/github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,9 @@ export default async (req, res) => {
notionValue,
userLogin: pull_request.user.login,
});
textToWrite += `\n Your team ${count.name} has used WatermelonAI ${count.github_app_uses} times.`;
if (!count.error) {
textToWrite += `\n Your team ${count.name} has used WatermelonAI ${count.github_app_uses} times.`;
}
// Fetch all comments on the PR
const comments = await octokit.request(
"GET /repos/{owner}/{repo}/issues/{issue_number}/comments?sort=created&direction=desc",
Expand Down

1 comment on commit e408486

@vercel
Copy link

@vercel vercel bot commented on e408486 Jun 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.