forked from aws/jsii
-
Notifications
You must be signed in to change notification settings - Fork 0
25 lines (23 loc) · 852 Bytes
/
Copy pathauto-approve.yml
File metadata and controls
25 lines (23 loc) · 852 Bytes
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
# Approve PRs with "auto-approve". mergify takes care of the actual merge.
name: auto-approve
on:
pull_request:
types:
- labeled # Run when labels are updated
- opened # Run when a PR is initially submitted
- ready_for_review # Run when a Draft PR is upgraded PR
- reopened # Run when a PR is re-opened
- synchronize # Run when a PR head branch is updated
jobs:
auto-approve:
if: |
contains(github.event.pull_request.labels.*.name, 'auto-approve') ||
github.event.label.name == 'auto-approve'
permissions:
actions: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- run: gh pr review --approve ${{ github.event.pull_request.number }} -R ${{ github.repository }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}