Implement semver-compatible action pin resolution#9027
Merged
Conversation
Collaborator
|
@copilot the upgrade of version should be semver compatible |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix resolution algorithm for action pins
Add test coverage for action pin resolution selecting highest version
Jan 5, 2026
- Add extractMajorVersion() and isSemverCompatible() helper functions - Update GetActionPinWithData() to prefer semver-compatible versions - When requesting v5, now resolves to v5.0.0 (not v6.0.0) - When requesting v4, now resolves to v4.6.2 (not v6.0.0) - Update tests to reflect new semver-compatible behavior Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Contributor
Author
Implemented semver-compatible version resolution in commit f0759ec. Now when requesting a major version (e.g., Examples:
|
- Add TestExtractMajorVersion with edge cases - Add TestIsSemverCompatible with various scenarios - Ensure helper functions handle all version formats correctly Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
Add test coverage for action pin resolution selecting highest version
Implement semver-compatible action pin resolution
Jan 5, 2026
Collaborator
|
@copilot format, lint go |
- Fix indentation in action_pins.go - Fix indentation in action_pins_test.go - Remove trailing whitespace Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Contributor
Author
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.
✅ Semver-Compatible Action Pin Resolution Complete
Successfully implemented semver-compatible version resolution as requested by @pelikhan. All changes are complete, tested, and formatted.
Changes Made
extractMajorVersion()helper insemver.goisSemverCompatible()helper insemver.goGetActionPinWithData()to filter for semver-compatible versionsTestGetActionPinWithData_SemverPreferenceNew Behavior
Before (crossed major version boundaries):
After (respects semver compatibility):
Resolution Algorithm
Example: actions/upload-artifact
Available: v4.6.2, v5.0.0, v6.0.0
Test Results
All tests pass with comprehensive coverage:
Commits
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.