Allow users to declare safe env files in .dotenv-stripout-ignore
, whose values won't be stripped
#7
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.
This PR closes #5, following the discussion in #1
It adds the option for users to include
.dotenv-stripout-ignore
files in their repos, which lists a set of files which should not be stripped. For example:the
.dotenv-stripout-ignore
file might look likeunsafe.env
might containand
safe.env
might containThe variables stored in unstripped files should represent public config, ie non-secret values which are safe to share publicly. Adding this feature matches the recommendations in https://12factor.net/config nicely.
In this implementation, the path discovery for patterns listed in the
.dotenv-stripout-ignore
file(s) approximately matches the behaviour of a.gitignore
file. The major changes are made indotenv_stripout/stripout.py
Note: Before the next release of the package, this PR should be followed by a more complete update to the project's documentation to help users understand the feature.