Skip to content

Add support for GitHub fine-grained personal access tokens #171

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

Closed
jvstein opened this issue Oct 19, 2022 · 2 comments
Closed

Add support for GitHub fine-grained personal access tokens #171

jvstein opened this issue Oct 19, 2022 · 2 comments

Comments

@jvstein
Copy link
Contributor

jvstein commented Oct 19, 2022

GitHub just added support for new fine-grained personal access tokens, but the validate_gh_pat function does not validate them properly.

The new tokens appear to match "^github_pat_[A-Za-z0-9_]+$"

✖ The PAT discovered for 'https:/github.com' has the wrong structure.
Error in `validate_gh_pat()`:
! Invalid GitHub PAT format
ℹ A GitHub PAT must have one of two forms:
• 40 hexadecimal digits (older PATs)
• A 'ghp_' prefix followed by 36 to 251 more characters (newer PATs)
ℹ Read more at <https://gh.r-lib.org/articles/managing-personal-access-tokens.html>.
@gaborcsardi
Copy link
Member

Thanks! Do you want to submit a PR? (No pressure.)

@jvstein
Copy link
Contributor Author

jvstein commented Oct 19, 2022

Sure! Submitted #172

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants