Skip to content

Commit

Permalink
fix: skip review events for PR authors (#537)
Browse files Browse the repository at this point in the history
  • Loading branch information
Srayash authored Nov 5, 2024
1 parent f0dcce4 commit 69969b9
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions scraper/src/github-scraper/parseEvents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,13 +202,15 @@ export const parseEvents = async (events: IGitHubEvent[]) => {
}
break;
case "PullRequestReviewEvent":
appendEvent(user, {
type: "pr_reviewed",
time: eventTime?.toISOString(),
title: `${event.repo.name}#${event.payload.pull_request.number}`,
link: event.payload.review.html_url,
text: event.payload.pull_request.title,
});
if (event.payload.pull_request.user.login !== user.login) {
appendEvent(user, {
type: "pr_reviewed",
time: eventTime?.toISOString(),
title: `${event.repo.name}#${event.payload.pull_request.number}`,
link: event.payload.review.html_url,
text: event.payload.pull_request.title,
});
}
break;
default:
break;
Expand Down

0 comments on commit 69969b9

Please sign in to comment.