Open andyfeller opened 2 years ago
Strangely that didn't happen to me. I wonder if it was using my GITHUB_TOKEN
that is in my environment?
Anyhow, could gh auth
allow this to use a github app for authentication so we get 15k requests per hour?
Is the gh
tool even the right spot to make that request?
@Chocrates : 🤔 that is a really good question, essentially:
Can
gh auth
leverage a GitHub App private key and installation information to authenticate for a one-time token?
That aside, gh
would pick up on your GITHUB_TOKEN
as explained in https://cli.github.com/manual/gh_help_environment
iam here
Problem
One of the helpful aspects of GitHub CLI extensions is their ability to delegate authorization issues to be handled by
gh auth
. This allows interpreted and precompiled extensions to delegate this responsibility, focusing on the core functionality.With initially running the
gh-repo-stats
extension, it prompted and required a personal access token (PAT) when this was already setup via standard GH CLI methods.$ gh repo-stats --org $(whoami) ###################################################### ###################################################### ############# GitHub repo list and sizer ############# ###################################################### ###################################################### ------------------------------------------------------ Please create a GitHub Personal Access Token used to gather information from your Organization, with a scope of 'repo', followed by [ENTER]: (note: your input will NOT be displayed)
Request
It would be nice if the extension was enhanced in a way where it did not need my PAT explicitly. Looking at the underlying interpreted script, I think this might be doable if all of the
curl
calls were instead leveraginggh api
or othergh
subcommands itself.
![Uploading Screenshot_20241015-184734.jpg…]()
Problem
One of the helpful aspects of GitHub CLI extensions is their ability to delegate authorization issues to be handled by
gh auth
. This allows interpreted and precompiled extensions to delegate this responsibility, focusing on the core functionality.With initially running the
gh-repo-stats
extension, it prompted and required a personal access token (PAT) when this was already setup via standard GH CLI methods.Request
It would be nice if the extension was enhanced in a way where it did not need my PAT explicitly. Looking at the underlying interpreted script, I think this might be doable if all of the
curl
calls were instead leveraginggh api
or othergh
subcommands itself.