Skip to content

ci: let the metrics refresh read cncf/tab issues - #2103

Merged
mrbobbytables merged 1 commit into
mainfrom
ci/refresh-metrics-issues-read
Nov 3, 2026
Merged

mrbobbytables merged 1 commit into
mainfrom
ci/refresh-metrics-issues-read

Conversation

@mrbobbytables

Copy link
Copy Markdown
Member

Every refresh of data/metrics.json committed by the Refresh metrics workflow has published 0 open reference architecture submissions and a 0-day median age (b5cf9ff on 2026-09-24, and #2100 today), while every run of the same collector from a maintainer's shell published the real count (13 then, 12 now). #1878 fixed the symptom by re-running the lane by hand; this is the cause.

refresh-metrics.yml pins GITHUB_TOKEN to contents: write and pull-requests: write and grants no issues permission. GET /repos/cncf/tab/issues returns both issues and pull requests, and a token with only pull request access sees only the pull request entries. collectLifecycleMetrics() drops those with !item.pull_request, leaving nothing to count, so the lane publishes zeros without any error. The architecture PR cards from cncf/architecture/pulls were unaffected, which is why the rest of the panel looked right.

Remit: /resources/metrics publishes a 0 open submissions card and a 0-day median against a dozen open cncf/tab submissions after each automated refresh.

What changed

issues: read added to the workflow's permissions, with a comment recording why. No collector change.

Verification

  • Reproduced: gh workflow run refresh-metrics.yml today (run 41690320039) wrote open-submissions: 0; the same githubAllPages call from a shell returns 169 issues, 26 labelled, 12 open.
  • node --test tests/ci-supply-chain.test.mjs tests/refresh-script-wiring.test.mjs tests/automation-workflow-ordering.test.mjs tests/ci-concurrency.test.mjs: 57 pass.
  • After merge: re-run the workflow and confirm chore: refresh metrics #2100 carries open-submissions: 12 before merging it.

Refs #1878

Every refresh of data/metrics.json committed by the Refresh metrics
workflow has published 0 open reference architecture submissions and a
0-day median age (2026-09-24, 2026-11-03), while every run of the same
collector from a maintainer's shell published the real count (13). The
workflow pins GITHUB_TOKEN to `contents: write` and `pull-requests: write`
and grants no issues permission. GET /repos/cncf/tab/issues returns both
issues and pull requests, and a token with only pull request access sees
only the pull request entries; the collector drops those with
`!item.pull_request`, leaving nothing to count. Grant `issues: read` so the
listing is complete.

Remit: /resources/metrics publishes a 0 open submissions card and a 0-day
median against a dozen open cncf/tab submissions after each automated
refresh.

Refs #1878

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: mrbobbytables <mrbobbytables@users.noreply.github.com>
@netlify

netlify Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for endusers ready!

Name Link
🔨 Latest commit 0c1f835
🔍 Latest deploy log https://app.netlify.com/projects/endusers/deploys/6aea2477d6c584d169074cfa
😎 Deploy Preview https://deploy-preview-2103--endusers.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@mrbobbytables
mrbobbytables merged commit 1cc20f0 into main Nov 3, 2026
15 checks passed
@mrbobbytables
mrbobbytables deleted the ci/refresh-metrics-issues-read branch November 3, 2026 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant