-
Notifications
You must be signed in to change notification settings - Fork 12
feat: Use public GitHub API for Nushell assets query, try to make it work for GitHub Enterprise #140
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
…work for GitHub Enterprise
Code Analysis
Security Review
Optimization Suggestions
Overall Quality: 3 Additional recommendations:
const octokit = new Octokit({
auth: tool.githubToken,
baseUrl: 'https://api.github.com',
request: {
timeout: 5000 // Add timeout
}
});
|
WalkthroughThe change updates the instantiation of the Changes
Sequence Diagram(s)sequenceDiagram
participant Caller as Caller
participant GR as getRelease()
participant OC as Octokit Client
participant API as GitHub API
Caller->>GR: Call getRelease(isNightly, checkLatest)
GR->>OC: Instantiate Octokit({ auth, baseUrl: "https://api.github.com" })
OC->>API: Query for releases
API-->>OC: Return release data
OC-->>GR: Deliver release data
GR-->>Caller: Send response
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
🔇 Additional comments (1)
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| const octokit = new Octokit({ auth: tool.githubToken, baseUrl: 'https://api.github.com' }); | ||
|
|
Copilot
AI
Apr 7, 2025
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.
Hardcoding the baseUrl limits support for GitHub Enterprise environments that use a different API endpoint. Consider making the baseUrl configurable based on the tool settings.
| const octokit = new Octokit({ auth: tool.githubToken, baseUrl: 'https://api.github.com' }); | |
| const octokit = new Octokit({ auth: tool.githubToken, baseUrl }); |
feat: Use public GitHub API for Nushell assets query, try to make it work for GitHub Enterprise
Summary by CodeRabbit