diff --git a/.github/workflows/pr-reminder.yml b/.github/workflows/pr-reminder.yml index 32e1dc1cc2dc2..d1a1b64af0838 100644 --- a/.github/workflows/pr-reminder.yml +++ b/.github/workflows/pr-reminder.yml @@ -2,9 +2,12 @@ name: PR Review Reminder on: schedule: - - cron: '0 9 * * 1-5' # Every weekday at 9:00 AM UTC + - cron: '0 9 * * 1-5' # Every weekday at 9:00 AM UTC pull_request: +permissions: + pull-requests: read + jobs: pr-review: runs-on: ubuntu-latest @@ -16,13 +19,13 @@ jobs: uses: actions/github-script@v5 with: script: | - const pullRequests = await github.pulls.list({ + const { data: pullRequests } = await github.rest.pulls.list({ owner: context.repo.owner, repo: context.repo.repo, state: 'open' }); - console.log(pullRequests); - + console.log(JSON.stringify(pullRequests, null, 2)); + - name: Send Slack Reminder if: steps.pr-list.outputs.result != '' uses: 8398a7/action-slack@v3