From a0e3b513c51ea8dc7f287671c72e2b1928b1216c Mon Sep 17 00:00:00 2001 From: Victor Alfaro Date: Fri, 6 Sep 2024 16:39:00 -0600 Subject: [PATCH] test --- .../cicd_scheduled_notify-seated-prs.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/cicd_scheduled_notify-seated-prs.yml b/.github/workflows/cicd_scheduled_notify-seated-prs.yml index 97d7676191e9..63b2d6bc460e 100644 --- a/.github/workflows/cicd_scheduled_notify-seated-prs.yml +++ b/.github/workflows/cicd_scheduled_notify-seated-prs.yml @@ -24,7 +24,23 @@ jobs: retry-exempt-status-codes: 400,401 github-token: ${{ secrets.CI_MACHINE_TOKEN }} script: | + const fetch = require('fetch') + + consta headers = { + 'Accept': 'application/vnd.github+json' + 'Authorization': 'Bearer ${{ secrets.GITHUB_TOKEN }}' + 'X-GitHub-Api-Version': '2022-11-28' + }; + async function fetchOpenPrs() { + const response = fetch( + 'https://api.github.com/repos/${{ github.repository_owner }}/${{ env.REPO }}/pulls?per_page=100', + { + headers, + }); + } + + async function fetchOpenPrs2() { const opts = github.rest.pulls.get.endpoint.merge({ ...{ baseUrl: 'https://api.github.com/repos/${{ github.repository_owner }}/${{ env.REPO }}/pulls',