-
Notifications
You must be signed in to change notification settings - Fork 474
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
🐛 Code Review: Use proportional scoring #2882
Conversation
Signed-off-by: Raghav Kaul <raghavkaul@google.com>
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #2882 +/- ##
=======================================
Coverage ? 58.89%
=======================================
Files ? 139
Lines ? 11154
Branches ? 0
=======================================
Hits ? 6569
Misses ? 4185
Partials ? 400 |
Isn't this the fix for #2812? |
@naveensrinivasan Yes! Typo - fixed. |
Signed-off-by: Raghav Kaul <raghavkaul@google.com>
Signed-off-by: Raghav Kaul <raghavkaul@google.com>
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.
If this is the desired scoring scheme, I think this PR looks good, but I think we should agree on the scoring though before merging as it seems like Azeem had different ideas in #2450 around if unreviewed bot PRs should be weighed differently.
I think the two approaches were:
- This sort of leveled scoring where an unreviewed bot PR drops the score to 7
- Just ignore reviewed (dependa)bot PRs to address the original problem in Wrong Scorecards result in CodeReview check due to Dependabot/RenovateBot PR reviews #2450, but otherwise use the same reviewed / total scoring we used before.
score = reviewed human / (reviewed human + any unreviewed )
I think there's value in the simplicity of 2, as we've had a few accidental scoring situations coding up this implementation. But ultimately I think we can come up with hypothetical "what if" scoring situations either way.
Stale pull request message |
Signed-off-by: Raghav Kaul <8695110+raghavkaul@users.noreply.github.com>
Signed-off-by: Raghav Kaul <raghavkaul@google.com>
Signed-off-by: Raghav Kaul <raghavkaul@google.com>
* Code Review: Use proportional scoring Signed-off-by: Raghav Kaul <raghavkaul@google.com> * address cr comments Signed-off-by: Raghav Kaul <raghavkaul@google.com> * revert repo_client.go Signed-off-by: Raghav Kaul <raghavkaul@google.com> * update * exclude bot PRs from scoring * missing import from merge Signed-off-by: Raghav Kaul <raghavkaul@google.com> * update * changeset.Unknown Signed-off-by: Raghav Kaul <raghavkaul@google.com> * address pr comments Signed-off-by: Raghav Kaul <raghavkaul@google.com> * set field Signed-off-by: Raghav Kaul <raghavkaul@google.com> * fix unittests Signed-off-by: Raghav Kaul <raghavkaul@google.com> * update Signed-off-by: Raghav Kaul <raghavkaul@google.com> --------- Signed-off-by: Raghav Kaul <raghavkaul@google.com> Signed-off-by: Raghav Kaul <8695110+raghavkaul@users.noreply.github.com> Signed-off-by: Allen Shearin <allen.p.shearin@gmail.com>
What kind of change does this PR introduce?
Revert Code-Review check to proportional scoring.
What is the current behavior?
Currently, Code-Review works like this:
If the only commit activity is by bots, we return inconclusively
If any number of bot code changes are unreviewed, the score drops 3 points
If ==1 human change is unreviewed, the score drops by 7 points
If >1 human change is unreviewed, the score drops to 0
What is the new behavior (if this is a feature change)?**
This takes Code-Review back to proportional scoring
If the only commit activity is by bots, we return inconclusively
If there is human and bot commit activity, but only bot commits are unreviewed, the score drops by 3 points
If all bot commits are reviewed, the score is based on the proportion of human commits that are unreviewed
Which issue(s) this PR fixes
Fixes #2812 .
Does this PR introduce a user-facing change?