Skip to content
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

feat: make GITHUB_TOKEN optional for fetch #942

Merged
merged 1 commit into from
Nov 30, 2023
Merged

Conversation

aliciaaevans
Copy link
Contributor

Check if the GITHUB_TOKEN environment variable exists for getting the PR during artifact fetching. Since it's a read-only request, it works without a token. The risk is that GitHub API has a 60 request/hr limit for unauthenticated users associated with the originating IP address. https://docs.github.com/en/rest/overview/rate-limits-for-the-rest-api

We talked about adding a flag to specify not using the token, but I thought it would be cleaner to just log a warning and proceed. (Also open to adjusting the retry for the tokenless option, but usually a rate limit would be 429 return code and this retry policy is only for 500, 502, 504.)

@aliciaaevans aliciaaevans marked this pull request as ready for review November 30, 2023 18:27
@aliciaaevans aliciaaevans requested a review from daler November 30, 2023 18:55
@daler daler merged commit c0eab1d into master Nov 30, 2023
9 checks passed
@daler daler deleted the gh-token-optional branch November 30, 2023 22:02
daler pushed a commit that referenced this pull request Dec 1, 2023
🤖 I have created a release \*beep\* \*boop\*
---
##
[2.11.0](https://www.github.com/bioconda/bioconda-utils/compare/v2.10.0...v2.11.0)
(2023-11-30)


### Features

* make GITHUB_TOKEN optional for fetch
([#942](https://www.github.com/bioconda/bioconda-utils/issues/942))
([c0eab1d](https://www.github.com/bioconda/bioconda-utils/commit/c0eab1d7224d6b13ebe399e7933460249e4e9a58))
---


This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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

Successfully merging this pull request may close these issues.

2 participants