Repository navigation
ci: pass GITHUB_TOKEN to pre-commit so lychee avoids GitHub throttling - #794
Merged
Merged
Conversation
Fixes gdsfactory#793 Co-authored-by: Niko Savola <niko@gdsfactory.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jackgdsf
requested review from
ThomasPluck,
joamatab and
nikosavola
as code owners
October 15, 2026 14:10
Contributor
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThe pre-commit CI step now receives the workflow’s GITHUB_TOKEN, enabling lychee to perform authenticated GitHub link checks and avoid failures caused by unauthenticated API rate limits or transient 503/429 responses. File-Level Changes
Assessment against linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Contributor
There was a problem hiding this comment.
Hey - I've reviewed your changes and they look great!
Sourcery assessment
Needs a human reviewer. The token becomes available to the pre-commit action and its hooks, so compromised or untrusted hook code could send it elsewhere and use whatever repository permissions it has before the token expires. Reverting removes the exposure going forward, but cannot undo any access or data exposure that already occurred.
nikosavola
enabled auto-merge (rebase)
October 15, 2026 14:15
nikosavola
approved these changes
Oct 15, 2026
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.
Fixes #793
The `lychee` hook in the `pre-commit` job checks github.com links unauthenticated, so GitHub sometimes answers with 503/429 and the job fails on links that are fine (e.g. #792: `Vlsir/Vlsir/blob/main/VlsirTools/readme.md` returned 503, but it returns 200).
This exports the workflow's `GITHUB_TOKEN` to the `pre-commit/action` step. lychee picks it up from the environment and checks GitHub links through the authenticated API. No other hooks use it.
`pre-commit run --all-files` passes locally.
Requested by @nikosavola
A human needs to review this before merge.
🤖 Generated with Claude Code
Summary by Sourcery
Authenticate GitHub link checks in the pre-commit CI job to avoid rate limiting and transient GitHub errors.
Bug Fixes:
CI: