From faa0f029a2936130a3cfb27ee06888440ea572ab Mon Sep 17 00:00:00 2001 From: Michael Cho Date: Tue, 10 Nov 2026 15:15:17 -0500 Subject: [PATCH] Revert "check-prs: use curl to reduce GitHub REST API usage" This reverts commit 60933af722706af0368135137a3696e5dbb4cfd7. We fixed excessive GitHub REST API usage elsewhere so can restore this. Also raw.githubusercontent.com is included in shared 5k/hour unauthenticated rate limit so hard to tell impact. --- .github/workflows/check-prs.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/check-prs.yml b/.github/workflows/check-prs.yml index 5c417249..e82f7fe2 100644 --- a/.github/workflows/check-prs.yml +++ b/.github/workflows/check-prs.yml @@ -65,13 +65,15 @@ jobs: - name: Fetch pull request template run: | - curl --fail --location --retry 3 --show-error --silent --output "${RUNNER_TEMP:?}/check-prs/template" \ - "https://raw.githubusercontent.com/${GITHUB_REPOSITORY:?}/refs/heads/main/.github/PULL_REQUEST_TEMPLATE.md" + gh api "repos/${GITHUB_REPOSITORY:?}/contents/.github/PULL_REQUEST_TEMPLATE.md?ref=main" \ + --jq ".content" | + base64 --decode >"${RUNNER_TEMP:?}/check-prs/template" - name: Fetch template checker run: | - curl --fail --location --retry 3 --show-error --silent --output "${RUNNER_TEMP:?}/check_template.rb" \ - https://raw.githubusercontent.com/Homebrew/.github/refs/heads/main/.github/scripts/check_template.rb + gh api "repos/Homebrew/.github/contents/.github/scripts/check_template.rb?ref=main" \ + --jq ".content" | + base64 --decode >"${RUNNER_TEMP:?}/check_template.rb" - name: Check pull request template id: template