Add pull request guidelines, update .gitignore, and enhance CLI output#532
Add pull request guidelines, update .gitignore, and enhance CLI output#532
Conversation
There was a problem hiding this comment.
Hello @yamadashy, 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!
Summary of Changes
This pull request introduces several enhancements to the repository. It adds guidelines for pull requests to improve contribution clarity, updates the .gitignore file to include rules for private files and refine existing ignore patterns, and enhances the CLI output to display the percentage of total tokens for top files, providing better insights into token distribution.
Highlights
- Pull Request Guidelines: Added guidelines for pull requests to the
base.instructions.mdfile, specifying the use of the pull request template and the inclusion of a clear summary of changes. - .gitignore Updates: Updated the
.gitignorefile to include rules for ignoring private files such as.cursor/rules/and.github/todo.md. - CLI Output Enhancement: Enhanced the CLI output in
cliPrint.tsto display the percentage of total tokens for top files, providing better insights into token distribution.
Changelog
- .github/instructions/base.instructions.md
- Added a section on Pull Request Guidelines, requiring the use of the pull request template and a clear summary of changes.
- .gitignore
- Added rules to ignore private files, specifically
.cursor/rules/and.github/todo.md.
- Added rules to ignore private files, specifically
- src/cli/cliPrint.ts
- Modified the
printTopFilesfunction to calculate and display the percentage of total tokens for each file. - Calculates the total token count across all files.
- Formats the CLI output to include the percentage of total tokens for each file.
- Modified the
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 is currently in preview and 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 to provide feedback.
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.
A pull request's gentle guide,
Clear summaries, side by side.
Tokens counted, insights gleam,
A coder's focused, waking dream.
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.
Code Review
This pull request introduces pull request guidelines, updates the .gitignore file, and enhances the CLI output. The changes are generally well-structured and improve the project's contribution process and CLI utility. However, there are a few areas where further refinement could be beneficial.
Summary of Findings
- Pull Request Guidelines: The pull request guidelines added to the base instructions are a good start, but could be expanded to include more specific guidance on code style, testing, and documentation.
- CLI Output Enhancement: The addition of percentage of total tokens to the CLI output is a useful enhancement, providing better insights into token distribution.
Merge Readiness
The pull request is in good shape and close to being ready for merging. The addition of pull request guidelines and the enhancement of CLI output are valuable improvements. I recommend addressing the medium severity comments before merging. I am unable to directly approve the pull request, and users should have others review and approve this code before merging.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #532 +/- ##
=======================================
Coverage 85.40% 85.41%
=======================================
Files 90 90
Lines 4434 4436 +2
Branches 874 876 +2
=======================================
+ Hits 3787 3789 +2
Misses 647 647 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Deploying repomix with
|
| Latest commit: |
546aa8b
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://6a609ff7.repomix.pages.dev |
| Branch Preview URL: | https://feat-token-count-rate.repomix.pages.dev |
There was a problem hiding this comment.
Pull Request Overview
This pull request enhances the CLI output to include the token percentage for top files, updates the pull request guidelines for clarity, and refines the .gitignore to better exclude private files.
- Adds percentage calculation for token counts in CLI output
- Introduces pull request guidelines in the repository instructions
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/cli/cliPrint.ts | Adds token percentage calculation to CLI output |
| .github/instructions/base.instructions.md | Adds guidelines to improve pull request clarity |
|
@coderabbitai review |
There was a problem hiding this comment.
Pull Request Overview
This PR introduces pull request guidelines to clarify contribution standards and enhances the CLI output to provide better insights into token distribution.
- Updated CLI output in src/cli/cliPrint.ts to include the percentage of total tokens.
- Added a new pull request guidelines section in .github/instructions/base.instructions.md.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/cli/cliPrint.ts | Enhanced logging to display additional token percentage information. |
| .github/instructions/base.instructions.md | Introduced guidelines with a checklist to standardize pull request submissions. |
Comments suppressed due to low confidence (1)
src/cli/cliPrint.ts:81
- [nitpick] Consider adding a brief comment next to the percentage calculation to clarify its intent for future maintainers.
const percentageOfTotal = totalTokens > 0 ? Number(((tokenCount / totalTokens) * 100).toFixed(1)) : 0;
📝 WalkthroughWalkthroughThis set of changes introduces documentation and configuration updates along with a minor enhancement to CLI output. A "Pull Request Guidelines" section is added to the instructions documentation, specifying requirements for PR summaries, templates, and referencing related issues. The .gitignore file is updated to exclude certain private files and directories. In the CLI code, the printTopFiles function now calculates and displays the percentage of total tokens each top file represents, in addition to existing output. Possibly related PRs
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. 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.
Actionable comments posted: 2
🧹 Nitpick comments (1)
.github/instructions/base.instructions.md (1)
84-95: Ensure the PR template file is present
The guidelines reference following a template, but I don’t see a.github/PULL_REQUEST_TEMPLATE.mdin the repo. Please verify or add this file to enforce the new guidelines.Let me know if you'd like me to draft the PR template file.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
.github/instructions/base.instructions.md(1 hunks).gitignore(1 hunks)src/cli/cliPrint.ts(1 hunks)
🧰 Additional context used
🪛 GitHub Check: codecov/patch
src/cli/cliPrint.ts
[warning] 83-83: src/cli/cliPrint.ts#L83
Added line #L83 was not covered by tests
⏰ Context from checks skipped due to timeout of 90000ms (5)
- GitHub Check: Build and run (windows-latest, 20.x)
- GitHub Check: Build and run (windows-latest, 23.x)
- GitHub Check: Build and run (windows-latest, 21.x)
- GitHub Check: Lint Biome
- GitHub Check: Cloudflare Pages
🔇 Additional comments (1)
.gitignore (1)
41-43: Added ignore patterns for private files: ✅The new
.cursor/rules/directory and.github/todo.mdfile are appropriately excluded, preventing internal artifacts from being tracked.
Introduce guidelines for pull requests to improve contribution clarity. Update
.gitignoreto include rules for private files and refine existing ignore patterns. Enhance the CLI output to display the percentage of total tokens for top files, providing better insights into token distribution.