{{ message }}
Repository navigation
Support hosted Dependabot through REST-only GitHub API access - #94
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds REST-only resolution for hosted Dependabot while retaining GraphQL behavior for normal tokens.
Changes:
- Detects Dependabot’s proxy token.
- Routes resolution, tag peeling, and reachability through REST.
- Expands fallback tests and eligibility checks.
Show a summary per file
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 7/7 changed files
- Comments generated: 1
- Review effort level: Medium
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.

Why
Hosted Dependabot supplies a dummy GitHub token, while its proxy injects the real token only for
GETandHEADrequests.gh-actions-lockused GraphQLPOSTrequests during relock, so action resolution failed with401 Bad credentials.How
GH_ACTIONS_LOCK_DEPENDABOT_PROXY=1to select REST-only mode at client startup. This avoids coupling behavior to the dummy token value without adding a CLI flag or documented user-facing feature.GETrequests without first attempting GraphQL.The fallback remains fail-closed: inaccessible repositories and unreachable refs still return errors. This does not require allowing authenticated
POSTrequests through the Dependabot proxy.Testing
go test -race -count=1 ./...go vet ./...make fmt-checkmake build && /opt/homebrew/opt/ruby/bin/ruby test/integration/run.rb dependabot_proxy_rest_onlyThe integration scenario runs the compiled binary against a private-repository stub with REST responses only. Any GraphQL
POSThas no matching handler and fails the scenario.