-
Notifications
You must be signed in to change notification settings - Fork 29
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
Enable filtering code reviewers based on team #25
Comments
@atomfinger can you share you current automation rule? |
@vim-zz It's basically what you have in your tutorial: the_right_reviewer:
if:
- true
run:
- action: add-comment@v1
args:
comment: |
{{ repo | explainRankByGitBlame(gt=25) }}
- action: add-reviewers@v1
args:
reviewers: {{ repo | rankByGitBlame(gt=25) }} To then filter out people we need to do something like this: config:
user_mapping:
- 'user that is part of team': 'atomfinger'
- 'user that is no longer in team': null |
And you would like to make sure that the assigned reviewer is a memebr of the PR author team? or do you have different desired logic? |
Well, not necessarily the PR author team. Just that the assigned reviewer is part of a specific team. The team might be the PR author team, but it isn't necessarily a given. Something like this would be cool: reviewers: {{ repo | rankByGitBlame(gt=25, team="Team A") }} But I'll happily accept having to use a filter or something else that might be more appropriate. I get that it might be undesirable to keep adding parameters to |
Got it. I am thinking of something like below, that will keep only users from 'Team A' in the resulting list.
Does it solve your problem? [Edit] to clarify |
@vim-zz , that would be perfect, yeah! |
@atomfinger I'm happy to share that gitStream now supports JavaScript plugins to build custom filter functions. Here are the docs. This enables you to extend gitStream capabilities substantially and should allow you to build a plugin that accomplishes what you're looking for. I created a post in our discussion forum for this plugin suggestion. We'd love to hear about any other ideas you have for plugin. We'd also love it if you share anything you create to solve this challenge, we can publish it in our plugin library if that interests you. Thanks again! Let me know if you have questions. |
Is your feature request related to a problem? Please describe.
As an organization, we have multiple GitHub teams that are responsible for various repositories. These teams are not necessarily fixed, so members split out into new teams and so forth. We handle this in technical terms by placing them on new GH teams.
The issue is that they are still contributors to the codebase, and they're still a part of the organization, which means that they'll likely to be assigned as code reviewers for teams they're no longer part of. Today's solution needs us to manually map their GH users to "null", but that means we have to go through our repositories and maintain that list. This can quickly become tedious when one works with a solution that has a ton of repositories while allowing teams to be a little dynamic.
Describe the solution you'd like
I would like to be able to filter reviewers based on their team.
Describe alternatives you've considered
Right now, the only other option I can think of is either to maintain the team member list for every repo, or have a script that updates every repo as time changes.
The text was updated successfully, but these errors were encountered: