Comments (4)
Oops, I completely forgot that @seanbecker15 reached out to me on Twitter...
Here's his suggestion - https://github.com/seanbecker15/auto-request-review/tree/per-group-number-of-reviewers
from auto-request-review.
Unfortunately, it doesn't support that use case. The biggest blocker is the option for the maximum number of reviewers applied to the whole reviewer selection.
Let's say five reviewers are chosen based on files changed and teams, and you have options.number_of_reviewers = 3
. The random three will be picked out of these five. This is because the randomise logic comes at the very end.
auto-request-review/src/index.js
Lines 71 to 75 in 2cfdd67
Off the top of my head, I can think of something like options.groups.[group_name].number_of_reviewers
.
I'm not sure if this is a good idea, but I think your case could be covered with this option:
reviewers:
groups:
team_1_maintainers:
- member_a
team_1_contributors:
- member_b
team_2_maintainers:
- member_c
team_2_contributors:
- member_d
per_author:
team_1_contributors:
- team_1_maintainers
- team_1_contributors
team_2_contributors:
- team_2_maintainers
- team_2_contributors
options:
groups:
team_1_maintainers:
number_of_reviewers: 1
team_2_maintainers:
number_of_reviewers: 1
from auto-request-review.
I think adding that option would work well for this use-case. Teams / groups would be coupled with a number of reviewers and could set the number of reviewers they want added to each PR.
One question I would have is how this option would interact with the global number of reviewers option. It seems like this global option might serve best as a default value if there aren't enough reviewers in the groups.
from auto-request-review.
Good question. I think it's important to make it backwards compatible. The global option should limit the total number of reviewers. If there are other ways to use the global options without breaking the current behaviour, that'd be great, but they can be similar but separate options.
from auto-request-review.
Related Issues (20)
- Remove reviewer when PR is converted to draft
- Don't set auto reviewers if theyโre already set manually
- What is the permission required?
- Unable to use github team HOT 4
- "explode" GitHub team when using as a reviewer group
- Github Team doesn't work as a group
- Don't re-request review if approval is already present for that reviewer HOT 1
- "last_files_match_only" does not work when pattern owner is a team HOT 1
- bug: workflow failed due to trying to request author as reviewer HOT 1
- File matched, but no assignment occurred HOT 1
- Re-request review from different reviewers
- Migrate from CODEOWNERS to this format
- Bump to Node.js 16 HOT 1
- Multiple glob patterns for the same group of reviewers HOT 2
- Error: Parameter token or opts.auth is required in PR opened by dependabot HOT 1
- Cannot use local file HOT 4
- bug: workflow fails on forks HOT 1
- Trying to parse config throwing vague error HOT 1
- Mention non-collaborators instead of requesting review from them and fail HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from auto-request-review.