feat: add support for separate team reviewers in configuration #279
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.
This pull request introduces support for specifying team reviewers separately from individual reviewers in the configuration, improving flexibility and clarity for assigning reviewers to pull requests. The changes update configuration documentation, TypeScript types, implementation logic, and add comprehensive tests to ensure correct behavior for both individual and team reviewers.
Configuration and Documentation Updates:
team_reviewers
section to the configuration files (README.md
,auto_assign_example.yml
) to allow specifying team reviewers distinctly from individual reviewers. Documentation clarifies thatnumberOfReviewers
only affects individual reviewers, not teams. [1] [2]TypeScript and Implementation Changes:
Config
interface insrc/handler.ts
to include ateamReviewers
array, reflecting the new configuration option.src/util.ts
(chooseReviewers
) to filter out the PR creator from individual reviewers, select the appropriate number of individual reviewers, and always include all specified team reviewers. [1] [2]Testing Enhancements:
test/handler.test.ts
andtest/util.test.ts
to verify correct handling of separate individual and team reviewers, including edge cases such as empty team reviewer lists and respecting thenumberOfReviewers
limit for individual reviewers. [1] [2] [3] [4]Test Data Consistency:
test/util.test.ts
for clarity and consistency. [1] [2] [3] [4] [5] [6]