-
Notifications
You must be signed in to change notification settings - Fork 205
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
Config Validation + Command Defaults #998
Merged
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
Codecov Report
@@ Coverage Diff @@
## master #998 +/- ##
=========================================
Coverage ? 80.67%
=========================================
Files ? 44
Lines ? 3311
Branches ? 666
=========================================
Hits ? 2671
Misses ? 470
Partials ? 170
Continue to review full report at Codecov.
|
…would get the internal label's description
hipstersmoothie
added
major
Increment the major version when merged
and removed
minor
Increment the minor version when merged
labels
Mar 1, 2020
hipstersmoothie
added
minor
Increment the minor version when merged
and removed
major
Increment the major version when merged
labels
Mar 1, 2020
hipstersmoothie
changed the title
Config Validation
Config Validation + Command Defaults
Mar 1, 2020
🚀 PR was released in |
3 tasks
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 Changed
Used io-ts to validate the
.autorc
and plugin configurations.Release Notes
Configs are now fully validated including plugins 🎉
🚀 Command Configuration 🚀
With the inclusion of configuration validation we decided to restrict valid root level keys to only options that are shared between commands. All of these options are called out in the
.autorc
docs.But for some commands it still makes sense to configure flag permanently in the
.autorc
. For those commands you can now supply defaults for flags using the following format.Example: Adding the following to you
.autorc
will makeauto
only release pre-releases to GitHub.Please refer to each command's documentation to see which options are configurable.
New Hook
For plugins configuration validation a new hook
validateConfiguration
was added for plugins to tap into and report configuration errors. Read moreWhy
closes #143
closes #999
I originally marked this as a
major
but after looking at the code it seems like you couldn't really set any arg in the autorc. just the few global args. most commands only use their options arg and do not refer to the base config.Todo:
📦 Published PR as canary version:
under canary scope @auto-canary@10.0.0-canary.998.13000.0
✨ Test out this PR locally via:
npm install @auto-canary/auto@10.0.0-canary.998.13000.0 npm install @auto-canary/core@10.0.0-canary.998.13000.0 npm install @auto-canary/all-contributors@10.0.0-canary.998.13000.0 npm install @auto-canary/chrome@10.0.0-canary.998.13000.0 npm install @auto-canary/conventional-commits@10.0.0-canary.998.13000.0 npm install @auto-canary/crates@10.0.0-canary.998.13000.0 npm install @auto-canary/first-time-contributor@10.0.0-canary.998.13000.0 npm install @auto-canary/git-tag@10.0.0-canary.998.13000.0 npm install @auto-canary/gradle@10.0.0-canary.998.13000.0 npm install @auto-canary/jira@10.0.0-canary.998.13000.0 npm install @auto-canary/maven@10.0.0-canary.998.13000.0 npm install @auto-canary/npm@10.0.0-canary.998.13000.0 npm install @auto-canary/omit-commits@10.0.0-canary.998.13000.0 npm install @auto-canary/omit-release-notes@10.0.0-canary.998.13000.0 npm install @auto-canary/released@10.0.0-canary.998.13000.0 npm install @auto-canary/s3@10.0.0-canary.998.13000.0 npm install @auto-canary/slack@10.0.0-canary.998.13000.0 npm install @auto-canary/twitter@10.0.0-canary.998.13000.0 npm install @auto-canary/upload-assets@10.0.0-canary.998.13000.0 # or yarn add @auto-canary/auto@10.0.0-canary.998.13000.0 yarn add @auto-canary/core@10.0.0-canary.998.13000.0 yarn add @auto-canary/all-contributors@10.0.0-canary.998.13000.0 yarn add @auto-canary/chrome@10.0.0-canary.998.13000.0 yarn add @auto-canary/conventional-commits@10.0.0-canary.998.13000.0 yarn add @auto-canary/crates@10.0.0-canary.998.13000.0 yarn add @auto-canary/first-time-contributor@10.0.0-canary.998.13000.0 yarn add @auto-canary/git-tag@10.0.0-canary.998.13000.0 yarn add @auto-canary/gradle@10.0.0-canary.998.13000.0 yarn add @auto-canary/jira@10.0.0-canary.998.13000.0 yarn add @auto-canary/maven@10.0.0-canary.998.13000.0 yarn add @auto-canary/npm@10.0.0-canary.998.13000.0 yarn add @auto-canary/omit-commits@10.0.0-canary.998.13000.0 yarn add @auto-canary/omit-release-notes@10.0.0-canary.998.13000.0 yarn add @auto-canary/released@10.0.0-canary.998.13000.0 yarn add @auto-canary/s3@10.0.0-canary.998.13000.0 yarn add @auto-canary/slack@10.0.0-canary.998.13000.0 yarn add @auto-canary/twitter@10.0.0-canary.998.13000.0 yarn add @auto-canary/upload-assets@10.0.0-canary.998.13000.0