feat: optional gh_token to install private-org deps in CI#56
Conversation
|
Warning Review limit reached
Next review available in: 4 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughBoth ChangesPrivate dependency Git authentication
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/build-tests.yml:
- Around line 91-102: The git authentication step in the workflow is leaving a
global token rewrite behind in `~/.gitconfig`, which can expose `GH_DEP_TOKEN`
to later steps. Update the `Authenticate git for private dependencies` step so
the `git config --global url."https://x-access-token:...".insteadOf` setting is
only applied for the `pre_install_pip` phase, or add a following cleanup step
with `always()` to remove that global config immediately after. Keep the fix
localized around the existing `Authenticate git for private dependencies` step.
In @.github/workflows/coverage.yml:
- Around line 128-139: The git authentication rewrite in the private
dependencies step leaves a global `insteadOf` rule behind, which can leak into
later operations such as the Pages deploy push. Update the workflow around the
Authenticate git for private dependencies step to add an immediate cleanup using
the same git config key so the token rewrite is removed right after pre-install;
use the existing authenticate step name and the git config
`url."https://x-access-token:${GH_DEP_TOKEN}`@github.com/`".insteadOf` setting as
the identifiers to locate and reverse.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: d7e401b9-73c3-45c2-b219-c287ae0735dd
📒 Files selected for processing (2)
.github/workflows/build-tests.yml.github/workflows/coverage.yml
52516ef to
c0e558d
Compare
build-tests and coverage gain an optional 'gh_token' secret; when set, a git insteadOf credential is configured before pre_install_pip so git URLs to PRIVATE org repos (e.g. an unpublished sibling package on a branch) clone successfully. No-op when unset — existing callers are unaffected. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…se positives Prerelease httpx builds (httpx==1.0.dev3, resolved under UV_PRERELEASE=allow) carry no parseable license metadata and pilosus reports category Error; marisa-trie (MIT) and psycopg2-binary (LGPL-with-exception) are misflagged WeakCopyleft. All three are unmodified imported libraries, safe under the Apache-2.0 donor policy. Add them to the central whitelist and the audited source-of-truth doc, using the same name-then-version anchored pattern as tqdm so they re-match pilosus's resolved name==version requirement. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
c0e558d to
7c2e579
Compare
The insteadOf rule embeds GH_DEP_TOKEN in the runner's global gitconfig, so every step after pre_install_pip could read it -- including third-party actions, the test suite, and the coverage Pages deploy push. Unset it immediately after pre_install_pip. Guarded by always() so the token does not survive a failed pre-install.
Adds an optional
gh_tokensecret to the reusablebuild-testsandcoverageworkflows. When a caller passes it, git is configured (insteadOf) to authenticate clones of PRIVATE org dependencies duringpre_install_pip. No-op when unset, so all existing callers are unaffected.Use case: a public repo whose CI installs an unpublished/private sibling package from a branch ref.
🤖 Generated with Claude Code
Summary by CodeRabbit