-
Notifications
You must be signed in to change notification settings - Fork 11
feat(governance): enforce author-dependent Governance Council approval rules #59
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
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
554ec5f
feat(governance): enforce author-dependent Governance Council approva…
carolinerg1 bee4374
feat(governance): simplify GC dynamic approval rules to 1 for GC, 2 f…
damaz91 08157f1
feat(governance): only override GC approvals for GC authors
damaz91 315d1a5
test(governance): clean up redundant GC author approval tests
damaz91 f783e45
test(governance): remove amithanda from test GC team
damaz91 17fea2c
feat(governance): require 2 total approvals when GC rule min_approval…
damaz91 0f76fbd
style(logger): update pending message phrasing to any member review
damaz91 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.
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.
len(approver_usernames) < require_total_approvalsCan you please double check and confirm the logic here?
I haven't looked too closely but I think there may be an edge-case bug here:
approver_usernamescan contain non-approving reviewers (e.g., users who only commented or requested changes), causinglen(approver_usernames)to pass even when there isn't a second actual approval.To fix this, we should count distinct valid approvals (excluding the PR author):
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.
Thanks for double-checking @amithanda - that’s actually already handled upstream in
_get_all_approvers_and_assigned_usernames():approver_usernamesis only populated from reviews wherestate == ReviewState.APPROVED(commenters and change requestors are placed intoassigned_usernamesinstead).if user != pr.author), soapprover_usernamesis guaranteed to contain only distinct, non-author approving reviewers.Because of that,
len(approver_usernames)accurately reflects the total number of distinct valid approvals on the PR.