I'm using PullApprove v3 for GitHub PRs. I have a larger team general-team
and a smaller team specific-team
. specific-team
is a subset of general-team
.
I want to allow PR approvals from anyone on general-team
but only send requests to specific-team
to avoid spamming general-team
.
I found in the PullApprove documentation that I can prefix a team with ~
to exclude them from receiving requests. My .pullapprove.yml
looks like this:
version: 3
groups:
code:
reviews:
required: 1
request: 2
reviewers:
teams:
- specific-team
- ~general-team
But because specific-team
is a subset of general-team
, they are marked unavailable and no requests go out. How can I send requests to specific-team
?
Some people use optional groups + overrides (and reviewed_for) to do this. Something like this:
version: 3
overrides:
- if: len(groups.approved.include("global-approvers")) == 1
status: success
explanation: 'Passing as globally approved by global approvers'
groups:
code:
reviews:
required: 1
request: 2
reviewers:
teams:
- specific-team
global-approvers:
type: optional
reviews:
request: 0
required: 1
reviewed_for: required
reviewers:
teams:
- general-team