feat: allowlist for version numbers in YAML comments#172
Merged
Trott merged 4 commits intonodejs:masterfrom Feb 22, 2021
Merged
feat: allowlist for version numbers in YAML comments#172Trott merged 4 commits intonodejs:masterfrom
Trott merged 4 commits intonodejs:masterfrom
Conversation
If an environment variable `NODE_RELEASED_VERSIONS` is detected, it is used 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 as invalid.
nschonni
reviewed
Feb 4, 2021
Trott
approved these changes
Feb 8, 2021
Member
|
Might be worth documenting this feature in the README or elsewhere? |
Contributor
Author
|
I think this is ready to land. Thoughts? |
aduh95
added a commit
to aduh95/node
that referenced
this pull request
Mar 6, 2021
PR-URL: nodejs#37599 Refs: nodejs/remark-preset-lint-node#172 Reviewed-By: Darshan Sen <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: James M Snell <[email protected]>
danielleadams
pushed a commit
to nodejs/node
that referenced
this pull request
Mar 16, 2021
PR-URL: #37599 Refs: nodejs/remark-preset-lint-node#172 Reviewed-By: Darshan Sen <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: James M Snell <[email protected]>
targos
pushed a commit
to nodejs/node
that referenced
this pull request
May 1, 2021
PR-URL: #37599 Refs: nodejs/remark-preset-lint-node#172 Reviewed-By: Darshan Sen <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: James M Snell <[email protected]>
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.
If an environment variable
NODE_RELEASED_VERSIONSis 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
REPLACEMEplaceholder, 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.