Skip to content

Commit cbd4af3

Browse files
committed
Add scheduled reminder commenting on open daily PRs
1 parent 4a0e3d5 commit cbd4af3

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Daily review reminder
2+
3+
on:
4+
schedule:
5+
# 16:00 UTC = 17:00 Europe/Warsaw in winter (18:00 in summer)
6+
- cron: '0 16 * * *'
7+
workflow_dispatch:
8+
9+
permissions:
10+
pull-requests: write
11+
12+
jobs:
13+
remind:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Mention the owner on open daily PRs
17+
env:
18+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
19+
GH_REPO: ${{ github.repository }}
20+
run: |
21+
prs=$(gh pr list --label daily --state open --json number --jq '.[].number')
22+
if [ -z "$prs" ]; then
23+
echo "No open daily PRs - nothing to remind about."
24+
exit 0
25+
fi
26+
for pr in $prs; do
27+
gh pr comment "$pr" --body "@${{ github.repository_owner }} ⏰ This daily topic is still waiting for your review."
28+
done

0 commit comments

Comments
 (0)