-
Notifications
You must be signed in to change notification settings - Fork 41
33 lines (31 loc) · 1.06 KB
/
pr-autoapprove.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
# Auto-approve hotfix pull requests.
#
# SOC-2 requires that all Github pull requests have 1 independent approval.
#
# > SOC 2 CM-03
# > System changes are approved by at least 1 independent person prior to deployment into production.
#
# We don't want hotfixes blocked on approval because they're 'emergency' changes,
# so we use this script and a Github Actions workflow (.github/workflows/pr_autoapprove.yml)
# to ensure hotfixes are immediately approved.
name: PR autoapprove
on:
pull_request:
types: [opened, reopened, labeled, edited]
pull_request_review:
types: [dismissed]
permissions:
contents: read
pull-requests: write
jobs:
autoapproval:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
runs-on: ubuntu-latest
name: Pull Request Auto-approval
steps:
- uses: actions/checkout@v3
- run: python -m pip install --upgrade pip && pip install httpx
# prettier-ignore
- run:
python3 .github/workflows/pr_autoapprove.py ${{ toJSON(github.event.pull_request.title) }} "${{ github.event.pull_request.number }}"