Comments (7)
@atomfinger can you share you current automation rule?
from gitstream.
@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
from gitstream.
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?
from gitstream.
And you would like to make sure that the assigned reviewer is a memebr of the PR author team?
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 rankByGitBlame
.
from gitstream.
Got it. I am thinking of something like below, that will keep only users from 'Team A' in the resulting list.
reviewers: {{ repo | rankByGitBlame(gt=25) | filterUsersOf(['Team A']) }}
Does it solve your problem?
[Edit] to clarify filterUsersOf
is not yet implemented.
from gitstream.
@vim-zz , that would be perfect, yeah!
from gitstream.
@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.
from gitstream.
Related Issues (20)
- Help: Run gitStream for forked pull requests HOT 11
- Add visibility field for `repo` context HOT 2
- Required reviewer not being removed if automation not run HOT 10
- Add wildcard/regex for ignore_repositories HOT 2
- GitStream workflow is failing for all open PRs HOT 5
- Add gitStream Status Page HOT 1
- wait_for_all_checks timeout on merge with rulesets HOT 7
- Approve gets re-requested occasionally HOT 3
- Reuse automations for few projects HOT 4
- A PR that used to run gitstream no longer runs gitstream HOT 1
- set-required-approvals@v1 blocking PR after 2 approvals received HOT 2
- Add MS Teams Screenshots to Automation Examples
- Add explicit trigger for pr ready for review HOT 4
- Automation rules are triggered multiple times in a single run HOT 7
- Error in .cm/gitstream.cm - undefined HOT 8
- Formatting Issues on Multiple Integration Pages
- TypeError: _formatInputToList.map is not a function HOT 2
- IntelliJ GitHub Pull Request Integration looks awful with code experts check HOT 1
- Detect formatting-only changes in JVM languages with `isFormattingChange` HOT 1
- Add `cron` based policies 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 gitstream.