-
-
Notifications
You must be signed in to change notification settings - Fork 4
45 lines (40 loc) · 1.47 KB
/
review-thread-gate.yml
File metadata and controls
45 lines (40 loc) · 1.47 KB
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 Thread Gate
on:
pull_request_review:
pull_request_review_comment:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
permissions:
contents: read
pull-requests: read
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.event.review.pull_request.number || github.run_id }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
defaults:
run:
shell: bash
jobs:
thread-gate:
name: Review Thread Gate
if: >-
github.repository == 'oaslananka-lab/kicad-studio' &&
(github.event.pull_request == null || github.event.pull_request.draft == false)
runs-on: ubuntu-24.04
timeout-minutes: 5
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
with:
persist-credentials: false
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e
with:
node-version-file: .node-version
- name: Check unresolved review threads
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_NUMBER: ${{ github.event.pull_request.number || github.event.review.pull_request.number || github.event.comment.pull_request_number }}
run: |
if [ -z "${PR_NUMBER}" ]; then
echo 'No pull request number found; skipping.'
exit 0
fi
node scripts/check-review-threads.mjs --repo "${{ github.repository }}" --pr "${PR_NUMBER}" --fail-on-actionable