Skip to content

Commit 5b2d8d1

Browse files
authored
ci(pull-requests): review notification bot (#2468)
This commit introduces an automated GitHub Actions workflow to remind reviewers about stale pull requests. The workflow runs daily at 12:00 PM UTC on business days and posts a reminder on non-draft PRs that have been waiting for review for two or more days and have fewer than two approvals. `status: in progress`, `status: pending review` labels are no longer required.
1 parent 7c3d8be commit 5b2d8d1

2 files changed

Lines changed: 28 additions & 10 deletions

File tree

.github/workflows/pr-lint.yml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,3 @@ jobs:
4444
echo "PR title is too long (greater than 85 characters)"
4545
exit 1
4646
fi
47-
48-
- name: Check PR labels
49-
env:
50-
LABEL_NAMES: ${{ toJson(github.event.pull_request.labels.*.name) }}
51-
if: "!((contains(env.LABEL_NAMES, 'pending review') && !contains(env.LABEL_NAMES, 'in progress') && !contains(env.LABEL_NAMES, 'blocked'))
52-
|| (!contains(env.LABEL_NAMES, 'pending review') && contains(env.LABEL_NAMES, 'in progress') && !contains(env.LABEL_NAMES, 'blocked'))
53-
|| (!contains(env.LABEL_NAMES, 'pending review') && !contains(env.LABEL_NAMES, 'in progress') && contains(env.LABEL_NAMES, 'blocked')))"
54-
run: |
55-
echo "PR must have "exactly one" of these labels: ['status: pending review', 'status: in progress', 'status: blocked']."
56-
exit 1
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: PR Review Reminder
2+
3+
on:
4+
schedule:
5+
# Run at 12:00 PM everyday.
6+
- cron: '0 12 * * *'
7+
8+
jobs:
9+
pr-review-reminder:
10+
permissions:
11+
contents: read
12+
pull-requests: write
13+
14+
runs-on: ubuntu-latest
15+
name: PR Review Reminder
16+
17+
steps:
18+
- name: Run PR Review Reminder
19+
uses: thundermiracle/review-reminder-action@224d83b90c76ac597776c79ba1f63539f0bc2795
20+
with:
21+
stale-days: 2
22+
ignore-draft: true
23+
# Don't ping people at weekends.
24+
only-business-days: true
25+
# 2 approvals are enough.
26+
skip-approve-count: 2
27+
token: "${{ secrets.GITHUB_TOKEN }}"
28+
send-reminder-comment: true

0 commit comments

Comments
 (0)