chore: add standardized git commit message template - #176
Conversation
Add .gitmessage.txt to enforce consistent commit message formatting across the project. Template includes: - Standard commit types (feat, fix, chore, refactor, docs, test) - Format guidelines and examples - Single-purpose commit enforcement rules - Character limits and best practices Supports fortress development workflow and prevents mixed-concern commits. Extracted from monster PR #171 as part of systematic decomposition. Tracked in issue #174. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
Pull Request Overview
Adds a standardized git commit message template to enforce consistent formatting and promote single-purpose commits across the development team.
- Introduces comprehensive commit message template with standard types and formatting rules
- Establishes guidelines for imperative mood, character limits, and single-concern commits
- Provides clear examples and usage instructions for developer adoption
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
Warning Rate limit exceeded@uelkerd has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 7 minutes and 43 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (1)
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. WalkthroughAdds a repository-level commit message template (.gitmessage.txt) defining conventional commit types, rules (single-purpose commits, <=50-char subject, imperative mood, no trailing period), and examples for each type. No code or API changes. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
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. Comment |
Reviewer's guide (collapsed on small PRs)Reviewer's GuideIntroduces a new git commit message template by adding a .gitmessage.txt file that defines standard commit types, formatting rules, examples, character limits, and single-purpose commit enforcement to improve consistency and developer workflow. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Summary of ChangesHello @uelkerd, 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 introduces a standardized Git commit message template to ensure consistency in commit history across the project. By providing clear guidelines and examples, it aims to improve developer experience, enforce single-purpose commits, and align with best practices for maintainable codebases. 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
|
|
Here's the code health analysis summary for commits Analysis Summary
|
There was a problem hiding this comment.
Code Review
This pull request introduces a standardized git commit message template, which is a great step towards enforcing a consistent commit history. My review focuses on ensuring this new template is consistent with existing project documentation and as clear as possible for developers. I've suggested two updates: one to align the commit types with CONTRIBUTING.md, and another to add scopes to the examples for better clarity. Overall, this is a valuable addition to the development workflow.
| # feat: A new feature | ||
| # fix: A bug fix | ||
| # chore: Changes to the build process or auxiliary tools/libraries | ||
| # refactor: A code change that neither fixes a bug nor adds a feature | ||
| # docs: Documentation only changes | ||
| # test: Adding missing tests or correcting existing tests |
There was a problem hiding this comment.
The list of commit types is inconsistent with the CONTRIBUTING.md file. The style type, which is defined in CONTRIBUTING.md (line 329), is missing from this template. Additionally, the order of types differs from the contributing guide.
To ensure consistency across project documentation and tools, I've added the missing style type and reordered the list to match CONTRIBUTING.md.
# feat: A new feature
# fix: A bug fix
# docs: Documentation only changes
# style: Code style changes (formatting, etc.)
# refactor: A code change that neither fixes a bug nor adds a feature
# test: Adding missing tests or correcting existing tests
# chore: Changes to the build process or auxiliary tools/libraries
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (5)
.gitmessage.txt (5)
3-3: Clarify optional scope and breaking-change marker in the format line.Conventional Commits allows optional scope and a
!before the colon to signal breaking changes; also consider documenting body/footer sections.-# Format: <type>(<scope>): <subject> +# Format: <type>(<scope>)!: <subject> +# (scope is optional; add "!" for breaking changes) +# Body: explain what and why, wrapped at ~72 chars per line +# Footer: references and BREAKING CHANGE notes
5-11: Align type list with Conventional Commits; separate chore vs build and add ci/perf/style/revert.Your current
choredescription overlaps withbuild. Adding these common types reduces ambiguity.# Types: -# feat: A new feature -# fix: A bug fix -# chore: Changes to the build process or auxiliary tools/libraries -# refactor: A code change that neither fixes a bug nor adds a feature -# docs: Documentation only changes -# test: Adding missing tests or correcting existing tests +# feat: A new feature +# fix: A bug fix +# docs: Documentation only changes +# style: Formatting, whitespace, missing semicolons, no code change +# refactor: Code change that neither fixes a bug nor adds a feature +# perf: A code change that improves performance +# test: Adding missing tests or correcting existing tests +# build: Changes to build system or external dependencies +# ci: Changes to CI configuration files and scripts +# chore: Other changes that don't modify src or test files +# revert: Reverts a previous commit
13-18: Tighten rules: ≤50-char subject, wrap body at ~72, and document issue/PR references.Minor polish to reduce ambiguity and encourage consistent footers.
# Rules: # - ONE purpose per commit (no "and", "also", "plus") -# - Subject line < 50 characters +# - Subject line ≤ 50 characters # - Use imperative mood ("Add" not "Added") # - No period at end of subject line +# - Wrap body at ~72 characters per line +# - Reference issues/PRs in footer (e.g., "Closes #123") +# - Use "BREAKING CHANGE: ..." in footer for breaking changes
19-25: Expand examples to include scope, breaking changes, and references.Concrete examples help adoption and reduce misunderstandings.
# Examples: -# feat: add user authentication system -# fix: resolve memory leak in model loading -# chore: update dependency versions -# refactor: simplify rate limiter logic -# docs: update API documentation -# test: add unit tests for validation functions +# feat(auth): add login with email magic links +# fix(loader): resolve memory leak in model loading +# perf(infer): cache tokenizer to reduce setup time +# refactor(rate-limit): simplify token bucket logic +# docs(api): update inference usage examples +# style: run formatter across repo +# build: bump torch to 2.4.x +# ci: parallelize test matrix +# revert: revert "feat(auth): add magic links" +# feat(core)!: switch default precision to bfloat16 +# BREAKING CHANGE: default precision is now bfloat16; set +# SAMO_PRECISION=float32 to keep previous behavior. +# Closes #174
1-2: Optional: Add usage hint at the top for quick setup.Helps new contributors discover the template without reading PR notes.
# SAMO-DL Commit Message Template # +# Quick setup: +# git config commit.template .gitmessage.txt +# # To make it global: git config --global commit.template "$(pwd)/.gitmessage.txt"
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.gitmessage.txt(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Sourcery review
- Add missing 'style' commit type to match CONTRIBUTING.md - Reorder commit types to match CONTRIBUTING.md order - Add scope examples to demonstrate optional scope field usage - Ensure consistency across project documentation and tools
…mits - Add quick setup instructions for git config - Clarify optional scope and breaking-change marker in format - Expand commit types to include perf/build/ci/revert - Separate chore vs build for better clarity - Tighten rules with ≤50-char subject and ~72-char body wrapping - Add footer reference guidelines for issues/PRs - Expand examples to include scope, breaking changes, and references - Align with Conventional Commits standard for better adoption
🎯 Purpose
Add standardized commit message template to enforce consistent formatting and prevent mixed-concern commits.
📋 Changes
🏰 Fortress Compliance
✅ Files: 1/5 (minimal scope)
✅ Purpose: Single concern (commit message standardization)
✅ Scope: Development workflow improvement only
✅ Branch: From main (fortress-compliant)
✅ Size: Single file, immediate value
🔄 Extraction Details
🧪 Testing
📊 Impact
🔧 Usage
Developers can configure git to use this template:
Phase 2 Progress: 1/4 documentation extractions complete
🤖 Generated with Claude Code
Summary by Sourcery
Add a standardized Git commit message template to enforce consistent formatting and single-purpose commits
Enhancements:
Documentation:
Summary by CodeRabbit