fix: correct shields.io badge URL in release notes#124
Merged
Conversation
Adding CLAUDE.md with task information for AI processing. This file will be removed when the task is complete. Issue: #123
The badge URL was broken for releases with tag prefixes (js-, rust-).
The format-github-release.mjs script was passing the full tag (js-v0.8.4)
to format-release-notes.mjs, but shields.io uses dashes as delimiters
in static badge URLs, causing "404 badge not found" errors.
Changes:
- Fix format-github-release.mjs to pass "v${version}" instead of "${tag}"
- Add comprehensive case study documentation in docs/case-studies/issue-123
- Add experiment script to test badge URL generation
Root cause: shields.io parses "npm-js-v0.8.4-blue" as:
LABEL="npm", MESSAGE="js", COLOR="v0.8.4-blue" (invalid)
Fixes #123
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add collected evidence: - data/release-info.json: GitHub release metadata - data/pr-122-info.json: PR details and commits - data/pr-122-diff.txt: Code changes from the problematic fix - data/issue-121-details.txt: Original issue that triggered the bug - data/ci-run-21057802787.log: CI workflow execution logs Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Contributor
Author
|
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
docs/case-studies/issue-123Problem
The release js-v0.8.4 showed a "404 badge not found" error instead of the npm version badge. This was caused by passing the full tag (
js-v0.8.4) to the badge URL instead of just the version (0.8.4).Root Cause
Shields.io static badges use dashes (
-) as delimiters:When the version included the prefix (
npm-js-v0.8.4-blue), shields.io interpreted it as:npmjsv0.8.4-blue(invalid!)Solution
Changed
format-github-release.mjsto passv${version}instead of${tag}toformat-release-notes.mjs, ensuring the badge URL contains only the version number.Test plan
experiments/test-badge-url.mjs)https://img.shields.io/badge/npm-0.8.4-blue.svgreturns valid badgehttps://img.shields.io/badge/npm-js-v0.8.4-blue.svgreturns "404 badge not found"Fixes #123
🤖 Generated with Claude Code