-
Notifications
You must be signed in to change notification settings - Fork 0
create and add octokit #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
for github data Co-Authored-By: Adithyan <100783336+adithyanmkd@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthroughIntroduces a new TypeScript module that encapsulates GitHub API access. It creates a pre-initialized Octokit client with optional authentication via the GITHUB_TOKEN environment variable and exports a helper function to fetch repository metadata from the GitHub API. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@src/lib/octokit.ts`:
- Around line 24-26: The catch block in the Octokit call is logging the entire
error object (which may include sensitive headers/auth), so change the error
logging in the catch inside the function that fetches the GitHub repo (the
try/catch around the Octokit request in src/lib/octokit.ts) to log only safe
information such as error.message and any non-sensitive fields (or a sanitized
copy), and avoid printing the full error object (do not log error.headers,
error.request, or the whole RequestError); keep the existing return null
behavior.
🧹 Nitpick comments (1)
src/lib/octokit.ts (1)
17-27: Consider adding an explicit return type and surfacing error context to callers.The inferred return type is a complex union from Octokit's generated types. An explicit annotation improves readability and acts as a contract. Also, returning
nullfor all failure modes (404, 401, rate-limit, network) makes it impossible for callers to react differently — consider re-throwing or returning a discriminated result if callers will need that context.octokit RequestError properties auth token headers
for github data
🚀 BΞYTΞFLʘW | Pull Request Protocol
PR Type: (Choose one:
feat|fix|refactor|docs|perf)Issue Link: Fixes #
📝 System Summary
Provide a concise brief of the changes introduced to the stream.
🛠️ Technical Changes
.........🧪 Quality Assurance (QA)
npm run buildexecuted without errors.🖼️ Visual Evidence
If this PR affects the UI, drop a screenshot or GIF below:
📡 Developer Authorization
Authorized by: @adithyanmkd @naheel0
Timestamp: {{ 9/2/2026 }}