Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: fetch events for bots #555

Conversation

AdityaJ2305
Copy link
Contributor

Proposed Changes

Fix: #554

Reviewer(s)

@rithviknishad

Copy link

netlify bot commented Dec 10, 2024

👷 Deploy request for leaderboard-develop pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 1948463

Copy link
Member

@rithviknishad rithviknishad left a comment

Choose a reason for hiding this comment

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

If this change prevented the issue, the previous change also prevented the issue... Are you sure this is right?

image

@AdityaJ2305
Copy link
Contributor Author

If this change prevented the issue, the previous change also prevented the issue... Are you sure this is right?

image

Let me check 😅

@AdityaJ2305
Copy link
Contributor Author

Hey @rithviknishad, I don’t think this issue is coming from this piece of code. There seems to be something else causing it.

@rithviknishad
Copy link
Member

You're right. But from where else it should come? 🤔

@rithviknishad
Copy link
Member

rithviknishad commented Dec 13, 2024

Looking at this: https://flatgithub.com/ohcnetwork/leaderboard-data?filename=data%2Fgithub%2Fdependabot%5Bbot%5D.json&sha=98a8603b63dd721a726a2e52c14014067c7e1f0e&tab=activity

Looks like only PR Merged events are there. And I had merged dependabot's PRs that day. So even though I was the one who merged it, the author of the PR is still dependabot. So likely some incorrect logic there maybe?

The Author of the PR should get the event and not the one who merged it.

appendEvent(event.payload.pull_request.user.login, {
type: "pr_merged",
title: `${event.repo.name}#${event.payload.pull_request.number}`,
time: eventTime?.toISOString(),
link: event.payload.pull_request.html_url,
text: event.payload.pull_request.title,
turnaround_time: turnaroundTime,
});

@AdityaJ2305
Copy link
Contributor Author

AdityaJ2305 commented Dec 13, 2024

Looking at this: https://flatgithub.com/ohcnetwork/leaderboard-data?filename=data%2Fgithub%2Fdependabot%5Bbot%5D.json&sha=98a8603b63dd721a726a2e52c14014067c7e1f0e&tab=activity

Looks like only PR Merged events are there. And I had merged dependabot's PRs that day. So even though I was the one who merged it, the author of the PR is still dependabot. So likely some incorrect logic there maybe?

The Author of the PR should get the event and not the one who merged it.

appendEvent(event.payload.pull_request.user.login, {
type: "pr_merged",
title: `${event.repo.name}#${event.payload.pull_request.number}`,
time: eventTime?.toISOString(),
link: event.payload.pull_request.html_url,
text: event.payload.pull_request.title,
turnaround_time: turnaroundTime,
});

Let me check

@rithviknishad, Am I understanding it wrong? It is okay na if the author is dependabot for its PRs.
The error is why it is not getting ignore due to this line 👇

if (isBlacklisted(user)) continue;

@rithviknishad
Copy link
Member

inactive

@AdityaJ2305 AdityaJ2305 deleted the issue/554/scraper_does_not_fetch_bot_events branch December 24, 2024 18:14
@AdityaJ2305 AdityaJ2305 restored the issue/554/scraper_does_not_fetch_bot_events branch December 24, 2024 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ensure scraper does not fetch bot events
2 participants