evergreen
evergreen copied to clipboard
Update Get-GitHubRepoRelease to support authenticated sessions to GitHub
Get-GitHubRepoRelease
has been updated to handle rate limiting for unauthenticated sessions to the GitHub API. Authenticated sessions to the API are not rate limited, thus Get-GitHubRepoRelease
could be updated to support authenticated sessions to fix scenarios where rate limiting kicks in.
Ref: https://docs.github.com/en/rest/overview/resources-in-the-rest-api#rate-limiting
Is there any ETA on this feature?
Not at the moment, there's several features and application that are ahead of this. Do you need to make more requests to GitHub than 60 in 60 mins?
Yes, but that's a pretty niche use case. I'm using evergreen as a part of up-to-date package repository and run it for the applications every day.
Authenticated sessions would be nice to have in the future, but I can work around it by splitting the work into two staggered jobs.
On Wed, Oct 27, 2021, 08:32 Aaron Parker @.***> wrote:
Not at the moment, there's several features and application that are ahead of this. Do you need to make more requests to GitHub than 60 in 60 mins?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/aaronparker/evergreen/issues/195#issuecomment-952584460, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHPPVEB5PHLOM7XLABBC4VTUI6MH5ANCNFSM47KYUUPQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
Thanks, use case makes sense.
Thinking about how to implement this. The simplest approach might be to get Get-GitHubRepoRelease
to check for an environment variable call GITHUB_TOKEN
. That way it would work when a token is added manually and would also work when run in a GitHub workflow. This would be a simple way to add support for authentication to the GitHub API with a personal access token.
You can check for both GITHUB_TOKEN
and GH_TOKEN
. The second one is also very commonly used.
Support for a token stored in GITHUB_TOKEN
added in 83c605b495e60b3bc4acccb2878f6b1a6e05c56c. Tests OK.