Skip to content

Add pull request guidelines, update .gitignore, and enhance CLI output#532

Merged
yamadashy merged 8 commits intomainfrom
feat/token-count-rate
May 6, 2025
Merged

Add pull request guidelines, update .gitignore, and enhance CLI output#532
yamadashy merged 8 commits intomainfrom
feat/token-count-rate

Conversation

@yamadashy
Copy link
Owner

Introduce guidelines for pull requests to improve contribution clarity. Update .gitignore to 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.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.md file, specifying the use of the pull request template and the inclusion of a clear summary of changes.
  • .gitignore Updates: Updated the .gitignore file to include rules for ignoring private files such as .cursor/rules/ and .github/todo.md.
  • CLI Output Enhancement: Enhanced the CLI output in cliPrint.ts to 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.
  • src/cli/cliPrint.ts
    • Modified the printTopFiles function 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.
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

  1. 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.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a 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 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
Copy link

codecov bot commented May 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.41%. Comparing base (b8a7065) to head (546aa8b).
Report is 9 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented May 6, 2025

Deploying repomix with  Cloudflare Pages  Cloudflare Pages

Latest commit: 546aa8b
Status: ✅  Deploy successful!
Preview URL: https://6a609ff7.repomix.pages.dev
Branch Preview URL: https://feat-token-count-rate.repomix.pages.dev

View logs

@yamadashy yamadashy requested a review from Copilot May 6, 2025 03:34
Copy link
Contributor

Copilot AI left a 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 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

@yamadashy yamadashy requested a review from Copilot May 6, 2025 03:41
@yamadashy
Copy link
Owner Author

@coderabbitai review

Copy link
Contributor

Copilot AI left a 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 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;

@coderabbitai
Copy link
Contributor

coderabbitai bot commented May 6, 2025

📝 Walkthrough

Walkthrough

This 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
  • 📝 Generate Docstrings

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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need 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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.md in 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

📥 Commits

Reviewing files that changed from the base of the PR and between b8a7065 and 470c81f.

📒 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.md file are appropriately excluded, preventing internal artifacts from being tracked.

@yamadashy yamadashy merged commit 97f429e into main May 6, 2025
55 checks passed
@yamadashy yamadashy deleted the feat/token-count-rate branch May 6, 2025 04:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants