-
Notifications
You must be signed in to change notification settings - Fork 174
49 lines (41 loc) · 1.35 KB
/
pr-auto-approve.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
46
47
48
49
name: Auto approve
on:
pull_request:
types: [ labeled, opened, synchronize, reopened ]
jobs:
auto-approve:
runs-on: ubuntu-latest
permissions:
pull-requests: write
if: ${{ contains(github.event.pull_request.labels.*.name, 'Auto Approve') }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: 'false'
fetch-depth: 0
- name: Check for changed files that are probably public API
id: protected-files-changes
uses: tj-actions/changed-files@v41
with:
files: |
app/app_pb/**
contrib/**/include/**
contrib/ecaltime/ecaltime_pb/**
ecal/core/cfg/**
ecal/core/include/**
ecal/core_pb/**
ecal/pb/**
lang/**
thirdparty/**
.gitmodules
- name: Public API has changed?
if: steps.protected-files-changes.outputs.any_changed == 'true'
run: |
echo "ERROR: Protected files have been changed:"
echo "${{ steps.protected-files-changes.outputs.all_changed_files }}"
exit 1
- uses: hmarr/auto-approve-action@v4
if: steps.protected-files-changes.outputs.any_changed == 'false'
with:
github-token: ${{ secrets.GITHUB_TOKEN }}