Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 review count #198
fix review count #198
Changes from 1 commit
2bbe1b0
09771af
b45124a
7b61494
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you explain why there are Two sets? All Unique and Unique? Could you explain the algorithm for how you are solving the problem?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The AllUnq set is used to count the total unique pull requests (PRs) reviewed.
and the 2nd set is For PRs reviewed in the last 7 days, we calculate and count the reviews for each date (day) and sum them up over this period.
In this process, if a PR has multiple reviews on the same day or on subsequent days, it is only counted once for its first review. Any subsequent reviews of the same PR are not counted again.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@konavivekramakrishna multiple distinct reviews on the same PR must be counted. But we shouldn't count the individual review comment on the PR. We should only count one review event.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rithviknishad
For example, in the following pr: ohcnetwork/care_fe#6479
what should be the count of pr_reviewed
The count of 'pr_reviewed' for this pull request in the current staging leaderboard is 13
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rithviknishad are you referring to multiple individuals reviewing the same pull request, or do you mean counting multiple distinct reviews by a single person?"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. For example, the recent review I've made on your PR in care (ohcnetwork/care_fe#7152 (review)), I've only requested changes ONCE (and you might have also got a mail notification once for the same). However, leaderboard shows 2 review events even though I've made only 1 review event.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The review event seems to be having an ID. Could you update the types? Or if we are not scrapping the ID, can we adjust the scraper to report only one review event for an ID?