Skip to content

Commit

Permalink
fix(api): skip review with unknown author
Browse files Browse the repository at this point in the history
  • Loading branch information
waltergalvao committed Jun 30, 2024
1 parent 39cd87f commit df7ff5b
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,14 @@ const upsertCodeReviews = async (
logger.debug("upsertCodeReviews", { pullRequest, reviews });

return parallel(10, reviews, async (review) => {
if (!review.author?.id || !review.author?.login) {
logger.info("syncCodeReviews: Skipping unknown author", {
review,
});

return;
}

const gitProfile = await upsertGitProfile(review.author);

return await getPrisma(pullRequest.workspaceId).codeReview.upsert({
Expand Down

0 comments on commit df7ff5b

Please sign in to comment.