v0.4.0
Features
-
The
gstore.env
module was introduced to provide a convenient way to work with environment variables used by various functions within Gstore. -
Added the following functions within
gstore.env
:lookup_token()
- lookup a personal access token in environment variables,get_host()
- get GitHub API hostname from environment variable,get_target()
- get base target to sync repos from environment variable.
Breaking Changes
- Moved
gstore.Client.TOKEN_NAMES
togstore.env.TOKEN_NAMES
. - Moved
gstore.args.get_token_from_env()
to ``gstore.env.lookup_token()`.
Improvements
- Improved
git.GitCommandError
message formatting for more accurate logging. - The program now correctly handle Control-C keyboard event and gracefully terminates.
- Gstore will exit with a status of one when its is called without any argument and there are not enough environment variables for normal operation.
- Calling program with an invalid token and without
--org
option no longer leads to abnormal program termination.
Trivial/Internal Changes
gstore.Client.__init__()
will raise nowgstore.client.ValidationError
when no token is provided.gstore.Client.resolve_orgs()
will raise nowgstore.client.InvalidCredentialsError
when provided token is invalid.