PR: Review Reminder #6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: 'PR: Review Reminder' | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| # Run on weekdays at 10:00 AM UTC. No new reminders can fire on weekends because | |
| # Saturday/Sunday are never counted as business days. | |
| - cron: '0 10 * * 1-5' | |
| # pulls.* list + listRequestedReviewers → pull-requests: read | |
| # issues timeline + comments + createComment → issues: write | |
| # repos.listCollaborators (outside) → Metadata read on the token (see GitHub App permission map) | |
| # checkout → contents: read | |
| permissions: | |
| contents: read | |
| issues: write | |
| pull-requests: read | |
| concurrency: | |
| group: ${{ github.workflow }} | |
| cancel-in-progress: false | |
| jobs: | |
| remind-reviewers: | |
| # `schedule` has no `repository` on github.event; forks must be skipped only for workflow_dispatch. | |
| if: github.event_name == 'schedule' || github.event.repository.fork != true | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Remind pending reviewers | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| const { default: run } = await import( | |
| `${process.env.GITHUB_WORKSPACE}/scripts/pr-review-reminder.mjs` | |
| ); | |
| await run({ github, context, core }); |