Use REST API in linkchecker script#158995
Open
ehuss wants to merge 1 commit into
Open
Conversation
This changes the linkchecker script to use the REST API instead of the raw endpoint to better deal with rate limits. We've noticed some occasional times when GitHub Actions hits the rate limit. I believe the raw http interface uses IP-based rate limits. On GitHub Actions, you're at the mercy of when other users exhaust the rate limit for the IP your job happens to grab. I believe this should help. This will require updating the repos that use this script in order to benefit. This should be backwards compatible, though.
Collaborator
|
r? @jieyouxu rustbot has assigned @jieyouxu. Use Why was this reviewer chosen?The reviewer was selected based on:
|
jieyouxu
approved these changes
Jul 9, 2026
Contributor
Author
|
@bors r=jieyouxu rollup |
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This changes the linkchecker script to use the REST API instead of the raw endpoint to better deal with rate limits. We've noticed some occasional times when GitHub Actions hits the rate limit. I believe the raw http interface uses IP-based rate limits. On GitHub Actions, you're at the mercy of when other users exhaust the rate limit for the IP your job happens to grab. I believe this should help, especially using the GITHUB_TOKEN from the Actions workflow.
This will require updating the repos that use this script in order to benefit. This should be backwards compatible, though.
I considered using the
ghcli as an alternative, which is more convenient to use, but I wanted to make sure that this script can easily be run locally, and it seems more likely that someone will have curl than gh.