Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions .github/workflows/progress-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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;
Expand Down Expand Up @@ -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} |`);
Expand Down
Loading