From 609fb8da4f96bfb7451d05ec4665acd0d9688219 Mon Sep 17 00:00:00 2001 From: Leo Camus Date: Sat, 28 Nov 2026 17:14:39 +0000 Subject: [PATCH] fix: authenticate the GitHub requests made by loadIssues loadIssues created its Octokit client without a token, so the daily update workflow lists the open issues anonymously, with the 60 requests per hour quota shared by the runner's IP. When that quota is used up, playlist:update dies with "API rate limit exceeded" before processing any approved request (runs 45297945861 and 44426790374). Pass GITHUB_TOKEN to the client, as loadDiscussions already does, and give the update step the app token, as validate_discussion.yml does. --- .github/workflows/update.yml | 2 ++ scripts/utils.ts | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml index 923001c7f5..3df29753fb 100644 --- a/.github/workflows/update.yml +++ b/.github/workflows/update.yml @@ -28,6 +28,8 @@ jobs: run: npm install - name: Update internal playlists id: playlist-update + env: + GITHUB_TOKEN: ${{ steps.create-app-token.outputs.token || secrets.GITHUB_TOKEN }} run: | npm run playlist:update echo "processed_issues=$(cat temp/logs/playlist_update.log)" >> $GITHUB_OUTPUT diff --git a/scripts/utils.ts b/scripts/utils.ts index a355207b35..a9793b28ba 100644 --- a/scripts/utils.ts +++ b/scripts/utils.ts @@ -243,7 +243,9 @@ export function parseStreamInfo(url: string, data: string): StreamInfo | undefin export async function loadIssues(props?: { labels: string | string[] }) { const CustomOctokit = Octokit.plugin(paginateRest, restEndpointMethods) - const octokit = new CustomOctokit() + const octokit = new CustomOctokit({ + auth: process.env.GITHUB_TOKEN + }) let labels = '' if (props && props.labels) {