-
Notifications
You must be signed in to change notification settings - Fork 241
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for fine-grained tokens #208
Conversation
Add flags and example for fine-grained tokens
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it works but can be better
-t TOKEN, --token TOKEN | ||
-f TOKEN_FINE, --token-fine TOKEN | ||
fine-grained personal access token | ||
-t TOKEN_CLASSIC, --token-classic TOKEN |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-t TOKEN_CLASSIC, --token-classic TOKEN | |
-t TOKEN_CLASSIC, --token TOKEN |
don't rename the old arg
if args.token_classic.startswith(_path_specifier): | ||
args.token_classic = open(args.token_classic[len(_path_specifier):], | ||
'rt').readline().strip() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need to support this ( file://
) for fine grained tokens too. otherwise you have to include the PAT on the command line.
Mind rebasing this and responding to the above feedback? |
What would be needed for this to be merge-able, @josegonzalez? Evaluating continuing the contribution, so it can be included in code base. Regarding the existing flags, my assumption would be that being backwards compatible (not altering existing) would be preferrable. I also see comments that address certain errors if the fine grained token does not give enough permissions. I'm not sure I would address this as a first step. |
Summary
This PR adds support for the beta fine-grained personal access tokens (PAT)
Changes implemented
token_fine
with the new-f
flag to support the new token format.token
command line argument intotoken_classic
, keeping the flag-t
Issues addressed
This PR addresses #205