Skip to content

fix(ci): extract downloads-badge script into a plain .mjs file - #31

Merged
shashikanth-gs merged 1 commit into
mainfrom
claude/canary-release-pipeline-vhraqt
Aug 12, 2026
Merged

shashikanth-gs merged 1 commit into
mainfrom
claude/canary-release-pipeline-vhraqt

Conversation

@shashikanth-gs

Copy link
Copy Markdown
Owner

Summary

The downloads-badge.yml workflow added in #30 never registered with GitHub Actions — confirmed missing from both the /actions/workflows API and the Actions UI itself, unlike every other workflow file in this repo (ci.yml, publish.yml, version.yml, all registered and working).

Suspected cause

The one structural difference between this workflow and the three working ones: it embedded a fairly complex multi-line Node script (backticks, nested template literals, comments, blank lines) directly inside a run: | YAML block scalar. It parses as valid YAML by generic linters, but GitHub's own workflow parser gives no visible error when it silently fails to register a file — so I can't confirm this was the exact cause, only that it's the one meaningful difference, and removing that risk is a no-regret change regardless.

Change

  • Moved the script to scripts/downloads-badge.mjs — a plain, lintable, independently-testable ES module.
  • Reduced the workflow step to a single line: run: node scripts/downloads-badge.mjs, matching the shape of every other working workflow in this repo.
  • Logic is unchanged — same chunked all-time download computation, same output files.

Test plan

  • After merge, confirm Downloads Badge appears in the repo's Actions tab
  • Manually dispatch it once and confirm the badges branch gets created with .github/badges/downloads.json + downloads-detail.json
  • Confirm the README's Total Downloads badge renders a real number

🤖 Generated with Claude Code

https://claude.ai/code/session_01ErQ6uTpLp3HE5yVTyq6fwv


Generated by Claude Code

The downloads-badge.yml workflow added in #30 never registered with
GitHub Actions — missing from both the workflows list and the Actions
UI, unlike every other workflow file in this repo. The one structural
difference: it embedded a fairly complex multi-line Node script
(backticks, nested template literals, comments) directly inside a YAML
block scalar, unlike ci.yml/publish.yml/version.yml, which all use
simple single-line `run:` commands.

Move the script to scripts/downloads-badge.mjs and reduce the workflow
step to `run: node scripts/downloads-badge.mjs`, removing that whole
class of risk regardless of whether it was the actual root cause.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ErQ6uTpLp3HE5yVTyq6fwv
@shashikanth-gs
shashikanth-gs merged commit 9795b8a into main Aug 12, 2026
3 checks passed
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.

2 participants