From 968f1ce3a05fa89cd2083e2d4f57969b3cfc0c40 Mon Sep 17 00:00:00 2001 From: auricom <27022259+auricom@users.noreply.github.com> Date: Fri, 20 Sep 2024 13:41:16 +0200 Subject: [PATCH] fix --- .github/workflows/pr-reminder.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) 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