Skip to content

Conversation

@CodeMeAPixel
Copy link
Owner

No description provided.

Copilot AI review requested due to automatic review settings January 26, 2026 00:48
@CodeMeAPixel CodeMeAPixel deleted the branch master January 26, 2026 00:50
@CodeMeAPixel CodeMeAPixel deleted the develop branch January 26, 2026 00:50
@CodeMeAPixel CodeMeAPixel restored the develop branch January 26, 2026 00:51
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR implements EOL (End of Life) policy compliance for artifact management, aligning with CFX's official EOL policy. The changes introduce dynamic support status assignment based on version recency, add statistics tracking, and improve version string formatting for hosting panels.

Changes:

  • Implemented position-based support status assignment (Latest = newest, Recommended = next 3, others determined by version thresholds)
  • Added artifact statistics calculation and API response field showing counts by support status
  • Changed FullVersion format from v1.0.0.{build} to {version}-{hash} for hosting panel compatibility
  • Changed default for includeEol parameter from true to false to exclude EOL artifacts by default

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
internal/services/artifacts.go Added ArtifactStats struct and calculation logic; refactored support status assignment to be position-based rather than threshold-based; updated generateFullVersion to include hash; added stats to ArtifactsResult
internal/handlers/artifacts.go Changed includeEol default to false; added stats object to API response metadata
CHANGELOG.md Documented all changes including breaking changes, additions, and fixes for version 0.2.0

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


// Determine support status based on position in sorted list
// Position 0 = Latest (newest single version)
// Position 1-3 = Recommended (stable versions)
Copy link

Copilot AI Jan 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment states "Position 1-3 = Recommended (stable versions)" but the code on line 262 uses "idx <= 3", which includes indices 1, 2, and 3. This is correct for "3 versions after Latest", but the comment is slightly misleading as it doesn't clarify that index 0 is handled separately. Consider revising to "Positions 1-3 = Recommended (next 3 stable versions after Latest)" for clarity.

Suggested change
// Position 1-3 = Recommended (stable versions)
// Positions 1-3 = Recommended (next 3 stable versions after Latest)

Copilot uses AI. Check for mistakes.
SortBy: c.Query("sortBy", "version"),
SortOrder: c.Query("sortOrder", "desc"),
IncludeEOL: c.QueryBool("includeEol", true),
IncludeEOL: c.QueryBool("includeEol", false),
Copy link

Copilot AI Jan 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The API documentation comment indicates the default value for includeEol is true, but the actual default has been changed to false on line 40. The documentation should be updated to reflect the new default value.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants