diff --git a/.github/workflows/daily-reminder.yml b/.github/workflows/daily-reminder.yml new file mode 100644 index 0000000..ce9fff9 --- /dev/null +++ b/.github/workflows/daily-reminder.yml @@ -0,0 +1,28 @@ +name: Daily review reminder + +on: + schedule: + # 16:00 UTC = 17:00 Europe/Warsaw in winter (18:00 in summer) + - cron: '0 16 * * *' + workflow_dispatch: + +permissions: + pull-requests: write + +jobs: + remind: + runs-on: ubuntu-latest + steps: + - name: Mention the owner on open daily PRs + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_REPO: ${{ github.repository }} + run: | + prs=$(gh pr list --label daily --state open --json number --jq '.[].number') + if [ -z "$prs" ]; then + echo "No open daily PRs - nothing to remind about." + exit 0 + fi + for pr in $prs; do + gh pr comment "$pr" --body "@${{ github.repository_owner }} ⏰ This daily topic is still waiting for your review." + done