This repository has been archived by the owner on Nov 3, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
feat: support config from cli args and config file #61
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 #61 +/- ##
==========================================
+ Coverage 75.15% 78.28% +3.12%
==========================================
Files 11 13 +2
Lines 157 175 +18
==========================================
+ Hits 118 137 +19
+ Misses 39 38 -1 |
noahnu
reviewed
Dec 16, 2020
noahnu
reviewed
Dec 16, 2020
noahnu
reviewed
Dec 16, 2020
noahnu
reviewed
Dec 16, 2020
noahnu
reviewed
Feb 2, 2021
noahnu
reviewed
Feb 2, 2021
@AnvarGazizovTH Left some comments. You'll also want to rebase on master. |
39755b8
to
666aa4f
Compare
noahnu
reviewed
Mar 26, 2021
|
||
1. Configs passed in as cli args | ||
2. Configs from a config file | ||
3. Environment variable configs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if env vars should take precedence over a config file? Not 100% sure. How do other tools handle this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
noahnu
approved these changes
Mar 26, 2021
@all-contributors add @WulffHunter for code |
I've put up a pull request to add @WulffHunter! 🎉 |
🎉 This PR is included in version 0.2.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Description
Add ability to use file for config as well as command line arguments.
To use specify a config file use the
--config-file
cli argument to pass in the relative path of the file.To pass in any specific config parameter as a command line argument use the parameter name as a cli argument.
ex.
commit-watch --github-token password123
If config parameters are present from multiple sources they are used in the following order:
Related Issues
Checklist