You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Feature Request: Allow Authenticated Github API Requests #5949
It would be good for Winget's PWSH module to automatically use GH_TOKEN or GITHUB_TOKEN environment variables to authenticate Github CLI requests: https://docs.github.com/en/actions/tutorials/authenticate-with-github_token. The former is the environment variable automatically used by the official gh cli tool, and the latter is the environment variable automatically provided by Github actions
Proposed technical implementation details
Based on the official Github API library docs, it looks like this enhancement would just be as simple as checking those env variables, and then setting the token in the client object:
// accessToken is from env var
client.Credentials = new Credentials(accessToken);
Activity
feat: authenticate GitHub API requests using GH_TOKEN/GITHUB_TOKEN in…
feat: authenticate GitHub API requests using GH_TOKEN/GITHUB_TOKEN in…
feat: authenticate GitHub API requests using GH_TOKEN/GITHUB_TOKEN in…
feat: authenticate GitHub API requests using GH_TOKEN/GITHUB_TOKEN in…
ci: improve winget installation reliability (#617)
feat: authenticate GitHub API requests using GH_TOKEN/GITHUB_TOKEN in…
ci: improve winget installation reliability (#617)
feat: authenticate GitHub API requests using GH_TOKEN/GITHUB_TOKEN in…
feat: authenticate GitHub API requests using GH_TOKEN/GITHUB_TOKEN in…