fix: validate-issue action - update getMinimumVSCodeVersion() to target VSCode "main" branch releases only, and correctly parse the version tag#7218
Open
AndrewStopchenko-SO wants to merge 1 commit intoforcedotcom:developfrom
Conversation
|
Thanks for the contribution! Before we can merge this, we need @AndrewNR to sign the Salesforce Inc. Contributor License Agreement. |
fb86f81 to
408bff3
Compare
… from main branch; run semver.coerce() on release.tag_name to ensure SemVer version format.
408bff3 to
703aa96
Compare
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.
What does this PR do?
VSCode releases turns out to have e.g. Copilot releases included, where a different tag versioning is applied - see the v0.44.1 Copilot release which shows as the latest at the moment.
As a result, retrieving "https://api.github.com/repos/microsoft/vscode/releases/latest" and extracting
release.tag_namecausedlatestVersion = "v0.44.1"=>getMinimumVSCodeVersion()returns"NaN.42.1"version value, which breaks thesemvercomparisons.What issues does this PR fix or reference?
[skip-validate-pr]
Functionality Before
"v0.44.1"tag produces invalid"NaN.42.1"version value as expected minimum VSCode version, and it throws an error when used with thesemver.gt(ver1, ver2)function.Functionality After
mainbranch. If no such releases found - fallback to the latest release.semver.coerce(release.tag_name)so that even the Copilot's release tag"v0.44.1"gets converted into the"0.44.1"proper version format before processing.