Fix border, tool select & more explanation - #4
Conversation
Summary of ChangesHello @smini-digital, 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 enhances the user experience of the CLI tool by refining the visual presentation of its header banner and improving the clarity of error messages. Specifically, it addresses an issue with banner alignment and provides more actionable advice to users encountering package manager detection problems during 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.
Code Review
This pull request addresses a display issue with the header banner by reconstructing it line-by-line, and improves the user guidance when a package manager is not detected. The header implementation, while functional, is overly complex and can be simplified for better readability. The clarification in the sqlcmd installer is a helpful addition for users.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces several useful improvements. The header banner rendering is now more robust, and the tool selection prompt now correctly validates that at least one tool is selected, improving the user experience. The error message for a missing package manager is also more helpful. The fixes for escaping quotes in the embedded Python scripts are correct. I've added a couple of suggestions to improve the formatting logic in the Python fallback code to make it more robust and consistent with the primary jq implementation.
The top and bottom borders were hardcoded while boxWidth was only used for inner content. Now both use the same variable for consistency.
runConfig threw errors containing the full args joined — for `config set contexts.X.grafana.password <value>` that embedded the plaintext password in error.message, which was then logged by the outer catch handler. Add a redactSensitiveArgs helper that replaces any value whose preceding key matches .token / .password / .secret / .apikey with <redacted> before building the error message. Addresses CodeQL alert #4 (js/clear-text-logging, error severity).
* ci: set explicit contents: read permissions on workflows Addresses CodeQL alerts #1, #3, #9 (actions/missing-workflow-permissions). Both workflows only need read access to the repo contents, so the minimal permissions block is set at the workflow level. * fix: use exact-match check for git SSH rewrite config value The installers were using .includes('https://github.com/') to check the output of `git config --get url.git@github.com:.insteadOf`. That output is either empty or exactly the value we set ourselves, so exact match is both more correct and silences CodeQL's js/incomplete-url-substring-sanitization rule. Addresses CodeQL alerts #5, #6, #7, #8 across atl, discord, esq, and n8n installers. * fix(grafanactl): redact secrets from runConfig error messages runConfig threw errors containing the full args joined — for `config set contexts.X.grafana.password <value>` that embedded the plaintext password in error.message, which was then logged by the outer catch handler. Add a redactSensitiveArgs helper that replaces any value whose preceding key matches .token / .password / .secret / .apikey with <redacted> before building the error message. Addresses CodeQL alert #4 (js/clear-text-logging, error severity).
Belongs to: enthus-appdev/atl-cli#16
✅ Header alignment - Fixed issues in the CLI banner
✅ Python f-string escaping - Fixed shell script parse errors by using
\\"instead of\"✅ Dynamic column alignment - Replaced hardcoded 12-char padding with tab-separated values +
column -tfor consistency with jq✅ Checkbox validation - Added validation to prevent empty selections in the tool selector -> Menu vanished without warning when used through https://github.com/enthus-appdev/environment-setup
-> Bump version in https://github.com/enthus-appdev after merge like https://github.com/enthus-appdev/environment-setup/commit/82a5333105f6b528cc533c0465834bd01392abde