docs(github): document authentication for private repositories#783
docs(github): document authentication for private repositories#783Ruby-Leung wants to merge 1 commit into
Conversation
|
Lost in the diff? Review this PR in Change Stack to follow the change map from intent to exact ranges. 📝 WalkthroughWalkthroughAdded a "Private repositories" section to the GitHub driver documentation explaining how to authenticate with a token for private repository access, including required permissions, configuration examples using environment variables, and a note clarifying GitHub Apps are not supported. ChangesGitHub Private Repository Documentation
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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: 1
🤖 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 `@docs/2.drivers/github.md`:
- Around line 38-40: Update the earlier statement that currently says the GitHub
token is only used for key fetching to match the "## Private repositories"
section: change the sentence around Line 13 so it states the provided `token` is
used for both listing keys via the GitHub API and for fetching raw file contents
from the CDN (i.e., requires read access to repo contents). Ensure the wording
aligns with the header "## Private repositories" and mentions the `token` option
explicitly.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
| ## Private repositories | ||
|
|
||
| To read a **private** repository, provide a GitHub access token via the `token` option. The same token is used both to list the keys (GitHub API) and to fetch file contents (raw CDN), so it needs read access to the repository's contents. |
There was a problem hiding this comment.
Resolve contradiction with the earlier token behavior statement.
This new section correctly says the token is used for both key listing and raw content fetch, but Line 13 still says token usage only applies to key fetching. Please update the earlier sentence to avoid conflicting guidance.
Suggested doc patch
-This driver fetches all possible keys once and keep it in cache for 10 minutes. Due to GitHub rate limit, it is highly recommended to provide a token. It only applies to fetching keys.
+This driver fetches all possible keys once and keeps them in cache for 10 minutes. Due to GitHub rate limits, providing a token is highly recommended. The token is used for key listing and raw content fetching.🤖 Prompt for 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.
In `@docs/2.drivers/github.md` around lines 38 - 40, Update the earlier statement
that currently says the GitHub token is only used for key fetching to match the
"## Private repositories" section: change the sentence around Line 13 so it
states the provided `token` is used for both listing keys via the GitHub API and
for fetching raw file contents from the CDN (i.e., requires read access to repo
contents). Ensure the wording aligns with the header "## Private repositories"
and mentions the `token` option explicitly.
Resolves #516.
Adds a Private repositories section to the GitHub driver docs explaining how to authenticate against a private repo, following @pi0's guidance in the issue:
reposcope), passed via thetokenoption.Docs-only change; no code changes.
Summary by CodeRabbit