gh
gh copied to clipboard
Add support for GitHub fine-grained personal access tokens
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>.
Thanks! Do you want to submit a PR? (No pressure.)
Sure! Submitted https://github.com/r-lib/gh/pull/172