Conversation
## Summary - Adds `&filter=*-g*` to the `prereleaseversion-shield` URL in [README.md](./README.md) so the **GitHub Pre-Release** badge filters to tags with the Nerdbank `-g<short-sha>` suffix only. - Drops the **NuGet Pre-Release** badge entirely (both the in-body usage and the link-reference definition). Shields' NuGet endpoint does not accept a filter; no clean fix exists. ## Why Observed after [#144](#144) merged: the **GitHub Pre-Release** badge displayed `v1.2.42` (a full release), even though the actual latest pre-release at the time was `1.2.40-g0f69a1b0a0`. Same for the **NuGet Pre-Release** badge. Root cause is shields.io semantics: - `github/v/release/...?include_prereleases` and `nuget/vpre/...` both mean *"include pre-releases as candidates and return the latest by published date / highest version"* — not *"show pre-releases only"*. - After every develop → main release merge, Nerdbank.GitVersioning publishes a full release with a height higher than any preceding pre-release, so both pre-release badges converge to their release-only siblings within seconds. For GitHub there's a clean fix: shields.io's `github/v/release` endpoint accepts a `filter` glob. The Nerdbank short-sha suffix `-g<10hex>` only appears on pre-release tags, so `filter=*-g*` cleanly selects pre-releases. For NuGet there isn't: - The NuGet shield ignores `filter` silently. - The `dynamic/json` shield rejects JSONPath filter predicates (`query not supported`). - NuGet's flat-container index is semver-sorted (pre-releases ahead of their stable counterparts), so `$.versions[-1]` lands on the same stable. No way to filter to pre-releases only without a custom hosted endpoint. Dropping it is cleaner than carrying a redundant badge — the GitHub Pre-Release badge now carries the develop-side signal on its own. ## Verification Hit the new shield URLs directly: - GitHub Pre-Release with `filter=*-g*` → `v1.2.40-g0f69a1b0a0` ✓ - GitHub Release (unchanged) → `v1.2.42` ✓ ## Upstream The upstream `ptr727/ProjectTemplate` README likely carries the same badge pattern and the same bug. A separate issue will be filed there with details for replication. ## Test plan - [ ] Copilot review on the current head — no factual / phrasing pushback. - [ ] `Check pull request workflow status` green. - [ ] After the next pre-release publish on develop, the GitHub Pre-Release badge updates to the new pre-release tag (not the latest stable).
Contributor
There was a problem hiding this comment.
Pull request overview
Updates README release badges so the pre-release signal tracks Nerdbank-generated pre-release tags instead of drifting to stable releases.
Changes:
- Adds a
filter=*-g*query parameter to the GitHub Pre-Release shields.io badge. - Removes the NuGet Pre-Release badge and its unused link reference.
This was referenced May 14, 2026
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
Brings develop forward into main. Net effect on main's content is
README.mdonly — the badge fixes from #145:prereleaseversion-shieldURL gains&filter=*-g*so the GitHub Pre-Release badge filters to Nerdbank's-g<short-sha>pre-release tags instead of converging to the latest stable after every release.git diff origin/main..origin/develop --stat:Why this release
After #144 landed today, the "GitHub Pre-Release" badge displayed
v1.2.42(the full release from #144) while the actual latest pre-release was1.2.40-g0f69a1b0a0. Same for the NuGet badge. Root cause:include_prereleasesandvpremean include pre-releases as candidates, not show pre-releases only — so Nerdbank's monotonically-increasing height makes the stable always win after a release merge.The upstream template carries the same bug; tracked at ptr727/ProjectTemplate#83 with the full fix recipe.
Test plan
Check pull request workflow statusgreen.-g<sha>tag rather than converging to the new stable.