-
Notifications
You must be signed in to change notification settings - Fork 0
Fix .NET version sorting in CI workflow README updates #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughThe GitHub Actions workflow for checking .NET updates now sorts active support-phase versions by major version number and implements a priority-based insertion strategy for new .NET entries in README.md, inserting after the latest ".NET X.0.Y" entry if present, otherwise after ".NET Framework 4.8.1". Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
Comment |
Co-authored-by: sensslen <[email protected]>
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
.github/workflows/check-dotnet-updates.yml (1)
273-292: Well-designed README insertion strategy with proper fallback logic.The two-tier insertion strategy correctly maintains ascending version order:
- Primary path (lines 275–282): Finds the last
.NET X.0.Yentry and inserts after it. Using[regex]::Escape()on line 280 safely handles special characters if a version has been matched previously.- Fallback path (lines 286–291): Inserts after
.NET Framework 4.8.1if no.NET X.0entries exist yet.- Conditional safety: Line 287 ensures the fallback only executes if the anchor line exists, preventing silent failures on unexpected README structures.
Combined with the sorted processing on line 52, entries will be added in ascending order.
One minor observation: the regex pattern on line 275 does not explicitly anchor to line boundaries or account for leading whitespace. For robustness in edge cases (e.g., if README formatting varies), consider aligning with the pattern on line 266, which uses
(\r?\n)\s*\*to capture indentation. The current approach works fine if entries always begin with*without leading special characters, but being more explicit with whitespace boundaries would be more defensive.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Jira integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
.github/workflows/check-dotnet-updates.yml(2 hunks)
🔇 Additional comments (1)
.github/workflows/check-dotnet-updates.yml (1)
52-52: Correct numeric sorting of .NET versions.The sorting logic properly extracts the major version number and sorts numerically, ensuring .NET 10 appears after .NET 9 (not before, as would happen with lexicographic sorting). This aligns with the PR objective.
The .NET update workflow processed versions in API order, causing misleading display order in README (e.g., .NET 10 appearing before .NET 9).
Changes
Sort versions numerically before processing:
Fix README insertion order: New entries now insert after the last existing
.NET X.0entry rather than always after.NET Framework 4.8.1, maintaining ascending order when multiple versions are added sequentiallyOriginal prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.