-
Notifications
You must be signed in to change notification settings - Fork 508
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
🐛 revert making RequiredPullRequestReviews a pointer #3728
🐛 revert making RequiredPullRequestReviews a pointer #3728
Conversation
While the current approach works with the tiered scoring, it wont work for probes or if we remove tiers. Making the struct nil to signal that PRs aren't required hides some of the data we do have. This is especially problematic for repo rules, where we can infer all settings by what we see or dont see. Signed-off-by: Spencer Schrock <[email protected]>
@diogoteles08 as the person most familiar with the code, can you take a first look? |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #3728 +/- ##
==========================================
- Coverage 76.04% 66.56% -9.48%
==========================================
Files 214 214
Lines 14803 14797 -6
==========================================
- Hits 11257 9850 -1407
- Misses 2871 4383 +1512
+ Partials 675 564 -111 |
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.
PR looks great to me and follows what I was expecting as well.
I commented some minor inconsistencies and doubts.
Signed-off-by: Spencer Schrock <[email protected]>
Signed-off-by: Spencer Schrock <[email protected]>
Signed-off-by: Spencer Schrock <[email protected]>
While the current approach works with the tiered scoring, it wont work for probes or if we remove tiers. Making the struct nil to signal that PRs aren't required hides some of the data we do have.
This is especially problematic for repo rules, where we can infer all settings by what we see or don't see.
What kind of change does this PR introduce?
bug fix, followup of #3499
What is the current behavior?
RequiredPullRequestReviews
is a pointerWhat is the new behavior (if this is a feature change)?**
RequiredPullRequestReviews
is a struct againthere's a new field
Required *bool
to measure if the PRs are requiredWhich issue(s) this PR fixes
Special notes for your reviewer
The most important changes are in
clients/githubrepo/branches.go
:&false
, unless we have data otherwise.&false
, unless we have data otherwise.In tests anything that had a non-nil
RequiredPullRequestReviews
was saying PRs were required:Which is now represented by:
similarly, anything which was:
is now:
Does this PR introduce a user-facing change?
For user-facing changes, please add a concise, human-readable release note to
the
release-note
(In particular, describe what changes users might need to make in their
application as a result of this pull request.)