[FEAT] Add ruleset rule for pull request required reviewers#3073
Merged
stevehipwell merged 6 commits intointegrations:mainfrom Feb 4, 2026
Merged
Conversation
|
👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday! We have a process in place for prioritizing and responding to your input. Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labeled with |
152b69d to
a4f0ad2
Compare
5 tasks
a4f0ad2 to
795b147
Compare
795b147 to
6f96e9b
Compare
stevehipwell
requested changes
Feb 3, 2026
6f96e9b to
2b084a7
Compare
nickfloyd
approved these changes
Feb 4, 2026
Collaborator
|
@deiga could you please rebase this? |
Add support for the required_reviewers rule parameter in pull_request rules for both organization and repository rulesets. This allows requiring specific team reviewers to approve changes based on file patterns. Implementation includes: - requiredReviewersSchema() shared schema definition - expandRequiredReviewers() for Terraform->API conversion - flattenRequiredReviewers() for API->Terraform conversion - Integration into expandRules() and flattenRules() - Schema integration in both org and repo ruleset resources
Add comprehensive unit tests for the expand/flatten helper functions: - TestExpandRequiredReviewers: validates expansion logic - TestExpandRequiredReviewersEmpty: handles edge cases - TestFlattenRequiredReviewers: validates flattening logic - TestFlattenRequiredReviewersEmpty: handles edge cases - TestRoundTripRequiredReviewers: verifies data integrity Add acceptance tests for both organization and repository rulesets: - Single reviewer configuration with file patterns - Multiple reviewers configuration - Update operations (minimum_approvals change) - Import state verification
Add documentation for the new required_reviewers nested block in both organization_ruleset and repository_ruleset resources. Documents the reviewer, file_patterns, and minimum_approvals attributes with their types and requirements.
- Add missing allowed_merge_methods field to pull_request section - Fix merge_queue fields from Required to Optional with defaults - Fix actor_id to show Optional with note about DeployKey - Add DeployKey to actor_type enum list - Add protected field to conditions.repository_name - Fix required_code_scanning_tool anchor link - Remove duplicate do_not_enforce_on_create
Signed-off-by: Timo Sand <timo.sand@f-secure.com>
Signed-off-by: Timo Sand <timo.sand@f-secure.com>
auto-merge was automatically disabled
February 4, 2026 19:17
Head branch was pushed to by a user without write access
2b084a7 to
374aae8
Compare
Collaborator
Author
|
@stevehipwell Done |
1 task
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Resolves #3081
Before the change?
After the change?
Pull request checklist
Schema migrations have been created if needed (example)Does this introduce a breaking change?
Please see our docs on breaking changes to help!