Assign Reviewers Based on Code Author
Create Groups and Assign Reviewers Based on the Code Author's Group
labels:
critical:
description: Critical review
color: 294b69
groups:
- name: seniors
description: Group of senior developers
kind: developers
spec: '["torvalds"]'
- name: juniors
description: Group of developers that have created less than 10 PRs
kind: developers
type: filter
param: developer
where: $pullRequestCountBy($developer, "all") < 10
workflows:
- name: critical
description: Pull requests by juniors should be reviewed by the senior developers
run:
if: $isElementOf($author(), $group("juniors"))
then:
- $addLabel("critical")
- $assignReviewer($group("seniors"), "round-robin")