fix(ci): extract downloads-badge script into a plain .mjs file - #31
Merged
Merged
Conversation
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
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The
downloads-badge.ymlworkflow added in #30 never registered with GitHub Actions — confirmed missing from both the/actions/workflowsAPI 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
scripts/downloads-badge.mjs— a plain, lintable, independently-testable ES module.run: node scripts/downloads-badge.mjs, matching the shape of every other working workflow in this repo.Test plan
badgesbranch gets created with.github/badges/downloads.json+downloads-detail.json🤖 Generated with Claude Code
https://claude.ai/code/session_01ErQ6uTpLp3HE5yVTyq6fwv
Generated by Claude Code