fix(csharp): add NuGet badges to GitHub release body#90
Merged
Conversation
Adding .gitkeep for PR creation (default mode). This file will be removed when the task is complete. Issue: #88
The C# release script now prepends version + downloads shields.io NuGet badges (linking to the specific package version) before the changelog notes, mirroring how the Rust release script emits Crates.io + Docs.rs badges. Refactor the script for testability and cover badge generation, existing-badge detection, package-id encoding, and payload assembly with unit tests. Closes follow-up on #88.
Member
Author
Working session summaryPR 90 finalized: #90
This summary was automatically extracted from the AI working session output. |
Member
Author
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost: $5.067205📊 Context and tokens usage:Claude Opus 4.7: (2 sub-sessions)
Total: (10.7K new + 144.5K cache writes + 6.4M cache reads) input tokens, 37.3K output tokens, $5.067205 cost 🤖 Models used:
📎 Log file uploaded as Gist (2339KB)Now working session is ended, feel free to review and add any feedback on the solution draft. |
Member
Author
🎉 Auto-mergedThis pull request has been automatically merged by hive-mind.
Auto-merged by hive-mind with --auto-merge flag |
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
Closes follow-up on #88 — "Still no NuGet badges in C# GitHub releases."
The C# release script (
csharp/scripts/create-github-release.mjs) used to write the changelog notes straight into the GitHub release body with no badges, while the Rust release script already injected Crates.io + Docs.rs shields.io badges that link to the specific package version. As a result, every C# release page (e.g.csharp-v2.4.0) was missing the NuGet version + downloads badges that the Rust release pages have.This PR mirrors the Rust pattern for C#:
buildNugetBadges(packageId, version)emits[](nuget.org/packages/<id>/<version>) [](nuget.org/packages/<id>/<version>).prependNugetBadges(notes, packageId, version)injects the badges above the changelog/Package footer and is a no-op when the badges are already present or--package-idis omitted.buildReleasePayload(...)wires the badge logic into the release API payload so that every future C# release published by CI carries the badges.isCliEntryPoint()) so the helpers can be unit-tested.The existing
csharp-v2.4.0release body was backfilled viagh release editso the fix is visible immediately, not only on the next release. Seedocs/case-studies/issue-88/github-data/csharp-v2.4.0-release-after-fix.jsonfor the post-fix snapshot.Template comparison
The upstream
csharp-ai-driven-development-pipeline-template/create-github-release.mjsalready implementsbuildNuGetBadgeandappendNuGetBadgeIfMissing— link-cli had drifted from it. Snapshot kept underdocs/case-studies/issue-88/templates/for evidence. Nothing to report upstream.Test plan
node --test csharp/scripts/release-scripts.test.mjs— 22/22 pass (16 prior + 6 new badge tests).--dry-runpayload contains bothimg.shields.io/nuget/v/clinkandimg.shields.io/nuget/dt/clinklinking tonuget.org/packages/clink/<version>.prependNugetBadgesskips when badges already present (idempotent re-run safe).prependNugetBadgesis a no-op when--package-idis empty (CLI usability preserved).csharp-v2.4.0release body verified on github.com.Fixes #88