-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (43 loc) · 1.5 KB
/
review.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: 👤 Review
on:
pull_request:
types: [opened, reopened, synchronize, labeled, unlabeled]
pull_request_review:
jobs:
require_reviewer:
name: require
runs-on: ubuntu-latest
steps:
- uses: tspascoal/get-user-teams-membership@v2
id: membership
name: Load teams of the user
if: ${{ github.actor != 'dependabot[bot]' }}
with:
username: ${{ github.event.pull_request.user.login }}
GITHUB_TOKEN: ${{ secrets.READ_ORG_TOKEN }}
- uses: Automattic/action-required-review@v3
name: Require reviews - api
if: ${{ github.actor == 'dependabot[bot]' || !contains(steps.membership.outputs.teams, 'api') }}
with:
requirements: |
- name: openapi.yaml
paths:
- openapi.yaml
teams:
- api
status: Review by athenianco/api is required
fail: ${{!contains(github.event.*.labels.*.name, 'review ignored')}}
token: ${{ secrets.GKWILLIE_REVIEW_TOKEN }}
- uses: Automattic/action-required-review@v3
name: Require reviews - webapp
if: ${{ github.actor != 'dependabot[bot]' && !contains(steps.membership.outputs.teams, 'webapp') }}
with:
requirements: |
- name: openapi.yaml
paths:
- openapi.yaml
teams:
- webapp
status: Review by athenianco/webapp is required
fail: ${{!contains(github.event.*.labels.*.name, 'review ignored')}}
token: ${{ secrets.GKWILLIE_REVIEW_TOKEN }}