Show deployed MiniPdf NuGet version - #147
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review. 📝 WalkthroughWalkthroughThe Pages workflow resolves the latest stable MiniPdf NuGet version and passes it to publishing. The converter page reads the assembly version, displays it as a NuGet link, and applies package-version styling. ChangesPackage version flow
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to The Pages build now stamps the deployed MiniPdf version into the web application, which displays it as a NuGet package link. No active merge-blocking risk is established. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🟡 Changes recommended
The Pages workflow’s NuGet version resolution step should be made resilient to transient NuGet API/network failures to avoid flaky deployments.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR updates the Blazor WebAssembly converter UI to display the deployed MiniPdf package version next to the title, and adjusts the GitHub Pages deployment workflow to resolve the latest stable MiniPdf version from NuGet and stamp it into the published build metadata.
Changes:
- Add a “NuGet vX.Y.Z” badge beside the MiniPdf title that links to the corresponding NuGet package version page.
- Add CSS styling for the version badge to match the site’s header styling.
- Resolve the latest stable MiniPdf version from NuGet during Pages deployment and pass it into
dotnet publishvia-p:Version=....
File summaries
| File | Description |
|---|---|
| MiniPdf.Web/MiniPdf.Web.Client/wwwroot/app.css | Adds .package-version styles for the new NuGet version badge. |
| MiniPdf.Web/MiniPdf.Web.Client/Pages/Converter.razor | Renders the NuGet badge and derives the displayed version from the MiniPdf assembly metadata. |
| .github/workflows/pages.yml | Fetches the latest stable NuGet version during deploy and stamps it into the WASM publish step. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| $index = Invoke-RestMethod 'https://api.nuget.org/v3-flatcontainer/minipdf/index.json' | ||
| $version = $index.versions | | ||
| Where-Object { $_ -notmatch '-' } | | ||
| Select-Object -Last 1 | ||
| if (-not $version) { | ||
| throw 'Could not resolve the latest stable MiniPdf version from NuGet.' | ||
| } | ||
| "version=$version" >> $env:GITHUB_OUTPUT |
Summary
Validation
dotnet build MiniPdf.Web/MiniPdf.Web.Client/MiniPdf.Web.Client.csproj -c Release -p:Version=0.41.1NuGet v0.41.1and links to the matching package pageSummary by CodeRabbit
New Features
Bug Fixes