-
-
Notifications
You must be signed in to change notification settings - Fork 56
v6.6.18 #33
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
v6.6.18 #33
Conversation
chore: ignore .bmad directory
… panel updates Introduce `panel-github-repository` in the configuration to allow specifying a custom repository for management panel assets. Update dependency versions and enhance asset URL resolution logic to support overrides.
Summary of ChangesHello @luispater, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request primarily enhances the configurability of the management control panel by allowing its GitHub repository source to be customized. This change provides more control over where the panel's assets are retrieved from. Additionally, it includes routine updates to several Go module dependencies to maintain a secure and up-to-date codebase, and updates ignore files to exclude a new Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
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.
Code Review
This pull request introduces a feature to allow customizing the GitHub repository for the management control panel, along with updating several Go dependencies. The changes look good overall, adding flexibility to the application. I've identified a couple of areas for improvement: one is a minor code redundancy in the configuration loading, and the other is a more significant bug in the new URL resolution logic that could lead to invalid API requests. My review includes suggestions to address these points.
I am having trouble creating individual review comments. Click here to see my feedback.
internal/managementasset/updater.go (273-278)
The current logic for resolving the release URL for api.github.com is not robust. If a user provides a URL ending in /releases or a URL to a specific release tag (e.g., .../releases/12345), it will construct an invalid API endpoint URL by simply appending /releases/latest. For example, .../releases becomes .../releases/releases/latest.
A safer approach is to parse the owner and repository from the path and reconstruct the correct /releases/latest URL. This ensures that various valid repository or release API URL formats are handled correctly and predictably.
if host == "api.github.com" {
// Path should be /repos/owner/repo...
// We can safely reconstruct the URL to point to the latest release.
parts := strings.Split(strings.Trim(parsed.Path, "/"), "/")
if len(parts) >= 3 && parts[0] == "repos" && parts[1] != "" && parts[2] != "" {
return fmt.Sprintf("https://api.github.com/repos/%s/%s/releases/latest", parts[1], parts[2])
}
// Fallback for unexpected api.github.com paths
return defaultManagementReleaseURL
}internal/config/config.go (336)
The default value for PanelGitHubRepository is set here before yaml.Unmarshal is called. However, there is logic on lines 372-375 that also sets the default value if the configuration value is empty after unmarshalling. This makes the assignment on this line redundant, as the logic on lines 372-375 is sufficient to handle cases where the key is missing, empty, or contains only whitespace in the YAML file. You can remove this line to avoid duplication and improve code clarity.
No description provided.