-
Notifications
You must be signed in to change notification settings - Fork 138
fix(cli): improve .gitignore when yomo init #1135
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
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.
Summary of Changes
Hello @fanweixiao, 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 updates the .gitignore
file template used when initializing new YoMo projects, specifically for Node.js serverless functions. The primary goal is to provide a more comprehensive set of ignore patterns to prevent common build artifacts, IDE-specific files, operating system-generated files, and other irrelevant files from being inadvertently committed to version control. This enhancement improves the out-of-the-box experience for developers by ensuring cleaner repositories from the start.
Highlights
- .gitignore Template Enhancement: The
.gitignore
file generated duringyomo init
for Node.js projects has been significantly expanded. It now includes patterns for Node.js specific files (e.g.,node_modules/
,npm-debug.log*
), various build artifacts (dist/
,build/
,coverage/
), common IDE/editor files (.vscode/
,.idea/
), OS-generated files (.DS_Store
), environment variables (.env*
), npm cache/logs, and test results.
Using Gemini Code Assist
The 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 in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command>
or @gemini-code-assist <command>
. Below is a summary of the supported commands.
Feature | Command | Description |
---|---|---|
Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
Help | /gemini help |
Displays a list of available commands. |
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 .gemini/
folder in the base of the repository. Detailed instructions can be found here.
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
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
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.
Pull Request Overview
This PR improves the .gitignore
file generation in the YoMo CLI initialization process by replacing a minimal gitignore with a comprehensive one that covers Node.js build artifacts, IDE files, OS-generated files, environment variables, npm cache/logs, test results, and YoMo-specific files.
Key Changes:
- Replaced basic 3-line
.gitignore
with a comprehensive template covering common development patterns - Added organized sections for different types of files to ignore
- Maintained existing YoMo-specific ignore patterns (
.wrapper.ts
)
Comments suppressed due to low confidence (1)
cli/serverless/nodejs/runtime.go:278
- The word 'impore' in the PR title appears to be a typo. It should likely be 'improve'.
gitignoreContent := `# Node.js
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
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 significantly improves the default .gitignore
file generated by yomo init
for Node.js projects, making it much more comprehensive. The changes are a good improvement.
I have one suggestion to improve maintainability by extracting the large string for .gitignore
into a separate file using //go:embed
, similar to how other templates are handled in the project.
Also, there seems to be a small typo in the pull request title ("impore" instead of "improve").
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1135 +/- ##
==========================================
- Coverage 52.22% 51.97% -0.26%
==========================================
Files 92 92
Lines 6606 6661 +55
==========================================
+ Hits 3450 3462 +12
- Misses 2947 2990 +43
Partials 209 209 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
The new
.gitignore
includes patterns for build artifacts, IDE/editor files, OS-generated files, environment variables, npm cache/logs, test results, and additional YoMo-specific files.also, Close #1132 #1133 #1119 #1134