gh
gh copied to clipboard
Improve configuration file
- Remove the hooks from the configuration file and put it somewhere else
- Version the changes on the hooks and, maybe, configuration
- Change format from JSON to something more humane, like YAML (not a priority)
Something quite useful would be to split the secret parts, like the API token, into a separate file. The latter could have o400
access permissions. My motivation is that in case you are recording your screen, you may spill information that would compromise your account just by editing (unrelated) options in the configuration. This won't happen if secret parts are separated, as you simply never touch that file.
Make it YAML would be more convenient so you can comment hooks rather than delete them e.g.
@epoberezkin, I currently have no time for doing that. I am open to pull requests, given that:
- MUST be 100% backwards compatible
- The pull request is easy to understand and doesn't break things
- The new parts are well tested
Though, it should not be an easy task anyways. Maybe JSON5 is easier (though not as good as YAML or .ini would be).
Off-topic(?): I am using .ini for the CLI of http://wedeploy.com (which is written in Go) and it is working like a charm. I have tried YAML, but found out maintaining a .ini was more user friendly & straight-forward for my needs on that tool.
I would prefer json5 since it is more idiomatic to JS devs. We could simply add this require('json5/lib/register')
before we load the json config.