Accepts the same arguments as shallow command for a token and list of
organizations.
To validate the token makes request to /me endpoint that doesn't
require any special permissions.
To validate organizations makes requests to /orgs/<name>.
Returns human friendly errors in 2 most common cases:
Invalid token (unauthorized error)
Organization doesn't exist
For any other errors it returns go-github error as is.
Example output:
$ ghsync validate --token=not-valid --orgs=src-d,thisorgshouldnotexistforsurebecauseisaidso
github token is not valid
exit status 1
$ ghsync validate --token=<valid> --orgs=src-d,thisorgshouldnotexistforsurebecauseisaidso
organization 'thisorgshouldnotexistforsurebecauseisaidso' is not found
exit status 1
$ ghsync validate --token=<valid> --orgs=src-d
$ echo $?
0
Accepts the same arguments as shallow command for a token and list of organizations.
To validate the token makes request to
/me
endpoint that doesn't require any special permissions.To validate organizations makes requests to
/orgs/<name>
.Returns human friendly errors in 2 most common cases:
For any other errors it returns go-github error as is.
Example output:
Ref: https://github.com/src-d/sourced-ce/issues/59