From c8f33e93d7277c0ea665fdb0f6d5bb90e87f1172 Mon Sep 17 00:00:00 2001 From: SMTP Relay & Email - Free Send <60409540+msgwing@users.noreply.github.com> Date: Mon, 17 Aug 2026 23:21:58 +0200 Subject: [PATCH] fix(ci): let the progress report read the traffic it exists to report The first run went out with its headline numbers missing: the traffic endpoints refused the Actions token with 'Resource not accessible by integration'. They map to the administration:read permission, which the workflow did not request. A report without visitor counts is the one thing this report cannot be. GitHub keeps traffic for 14 days and nobody else is writing it down, so a missed run is a hole in the only trend the project has. The failure is now core.error rather than core.warning, and the table says the API refused rather than that it did not respond. A report that quietly drops the numbers it exists to carry reads like a calm week. --- .github/workflows/progress-report.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/progress-report.yml b/.github/workflows/progress-report.yml index b6f4d78..7fbbad5 100644 --- a/.github/workflows/progress-report.yml +++ b/.github/workflows/progress-report.yml @@ -23,9 +23,15 @@ on: - cron: '0 6 */3 * *' # every three days, 06:00 UTC workflow_dispatch: +# `administration: read` is what the traffic endpoints map to. Without it the +# first run reported "Resource not accessible by integration" and the report +# went out with its headline numbers missing - which is the one thing this +# report cannot be, since GitHub keeps traffic for only 14 days and nobody +# else is writing it down. permissions: contents: read issues: write + administration: read jobs: report: @@ -49,7 +55,11 @@ jobs: referrers = (await github.rest.repos.getTopReferrers({ owner, repo })).data; paths = (await github.rest.repos.getTopPaths({ owner, repo })).data; } catch (e) { - core.warning(`Ruch niedostępny: ${e.message}`); + // Loud, not quiet. A report that silently drops the numbers it + // exists to carry looks like a calm week. + core.error( + `Ruch niedostępny: ${e.message}. Raport pójdzie bez ` + + `najważniejszych liczb - sprawdź uprawnienie administration: read.`); } const meta = (await github.rest.repos.get({ owner, repo })).data; @@ -98,7 +108,7 @@ jobs: L.push(`| Unikalni odwiedzający (14 dni) | **${num(views.uniques)}** |`); L.push(`| Odsłony (14 dni) | ${num(views.count)} |`); } else { - L.push('| Ruch | **niedostępny — API nie odpowiedziało** |'); + L.push('| Ruch | ⚠️ **niedostępny — API odmówiło dostępu** |'); } L.push(`| Gwiazdki | **${meta.stargazers_count}** |`); L.push(`| Forki | ${meta.forks_count} |`);