Source Code: https://github.com/browniebroke/all-repos-envvar
An all-repos extension to read values from environment variables.
Important
As of all-repos v1.25, you may not need this package, see section below
Install this via pip (or your favourite package manager):
pip install all-repos-envvar
This library should be installed alongside all-repos
so that it's findable at import time. It provides a custom source
and push
to get the GitHub API key from an environment variable GITHUB_API_KEY
(reading from and .env
file is also supported), allowing you to omit it from the config:
{
"output_dir": "output",
"source": "all_repos_envvar.source",
"source_settings": {
"username": "browniebroke"
},
"push": "all_repos_envvar.push",
"push_settings": {
"username": "browniebroke"
}
}
The source module extends all_repos.source.github
and the push module extends all_repos.push.github_pull_request
.
I wanted this feature, but at the time, it looked like it would never be implemented in the main repo, hence this little extension. Since then, the author of all-repos apparently changed their mind and support for reading from environment variable was added in early 2023, and it's now included since release v1.25.0.
The only extra feature that this package provides is to read from .env
file, but this can be achieved by more general solutions like direnv
.
Thanks goes to these wonderful people (emoji key):
Bruno Alla 💻 🤔 📖 |
This project follows the all-contributors specification. Contributions of any kind welcome!
This package was created with Cookiecutter and the browniebroke/cookiecutter-pypackage project template.