-
Notifications
You must be signed in to change notification settings - Fork 4.2k
40 lines (37 loc) · 1.45 KB
/
contractors_review_requirements.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
name: Connector Ops CI - Check contractors review requirements
on:
pull_request:
types:
- opened
- ready_for_review
- reopened
- synchronize
jobs:
check-review-requirements:
name: "Check if a review is required from Connector teams"
runs-on: ubuntu-latest
if: ${{ github.event.pull_request.head.repo.fork == false }}
# This workflow cannot run on forks, as the fork's github token does not have `read:org`
# permissions, which are required to check the user's team membership. We assume that a
# review on a fork's PR is always required from one or more connector teams and/or support.
steps:
- name: Check contributor team membership
uses: tspascoal/get-user-teams-membership@v3
id: actorTeams
with:
username: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.OCTAVIA_4_ROOT_ACCESS }}
- if: ${{ (contains(steps.actorTeams.outputs.teams, 'community-contractor')) }}
name: Check if the review requirements are met
uses: Automattic/action-required-review@v3
with:
status: Required review
token: ${{ secrets.OCTAVIA_4_ROOT_ACCESS }}
request-reviews: true
fail: true
requirements: |
- paths:
- "airbyte-integrations/connectors/source-**"
- "airbyte-integrations/connectors/destination-**"
teams:
- dev-marketplace-contributions