-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: allowlist for version numbers in YAML comments #172
Merged
Conversation
This file contains 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
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
Might be worth documenting this feature in the README or elsewhere? |
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 <raisinten@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
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 <raisinten@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
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 <raisinten@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
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_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
.