Private repos?
cpenner-va opened this issue · comments
I get
Error: could not display pull requests. Please make sure this is a valid repository.
I assume it's because my github repository is private; is there a way to have the utility ask for auth or use existing github auth?
Yes! I really want to add this. The API supports it but I need to figure out how to recognize that and ask for username / password or something like that. I'll look into it!
Username/password will not work if you have two-factor authentication enabled so it might be better to use a token (or give the choice to the user). One option could be to add a --login
flag (or maybe --set-token
to support other options as well) which asks for a token (or username/password) and saves it to disk and next time pullit
are invoked it will use the credentials if any :)
Thanks @tjoskar! All good info.
Perhaps storing these in a folder called ~/.pullit
(and equivalent for Windows) with a credentials file similar to that of the AWS cli would work for this?
This could open up for some pretty neat customization!
~/.pullit/
├── credentials.json
├── config.json
~/.pullit/credentials.json
with different profiles (based on the auth options in node-github
):
{
"default": {
"type": "token",
"token": "<your_token_here>"
},
"other-profile-with-oauth": {
"type": "oauth",
"key": "<your_client_id>",
"secret": "<your_client_secret_here>"
}
}
And ~/.pullit/config.json
with some example config
{
"remote": {
"default": "origin"
},
"colors": {
"background-color": "rgba(0, 0, 0, 0)",
"color": "rgba(255, 255, 255, 255)"
}
}