feat: allowlist for version numbers in YAML comments #172
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.
If an environment variable
NODE_RELEASED_VERSIONS
is detected, it isused to validate the version numbers in the YAML comments. At the
notable exception of version numbers 0.0.x and 0.1.x, and the
REPLACEME
placeholder, any value not in the list is reported asinvalid.
The idea is to add a script on the node repo GH actions to parse the changelogs to populate the env variable. It won't change anything for doing local linting, but may help spot version errors when reviewing PRs.
For info, it let me spot nodejs/node#37231 and nodejs/node#37232, and I've seen a few times contributors trying to guess the next release version number because they didn't know about
REPLACEME
.