Skip to content

chore: add standardized git commit message template - #176

Merged
d-ulker merged 3 commits into
mainfrom
chore/add-git-message-template
Sep 22, 2025
Merged

chore: add standardized git commit message template#176
d-ulker merged 3 commits into
mainfrom
chore/add-git-message-template

Conversation

@d-ulker

@d-ulker d-ulker commented Sep 22, 2025

Copy link
Copy Markdown
Owner

🎯 Purpose

Add standardized commit message template to enforce consistent formatting and prevent mixed-concern commits.

📋 Changes

  • .gitmessage.txt: Comprehensive commit message template with:
    • Standard commit types (feat, fix, chore, refactor, docs, test)
    • Format guidelines and examples
    • Single-purpose commit enforcement rules
    • Character limits and best practices

🏰 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

  • ✅ Pre-commit hooks pass
  • ✅ Fortress guard validation (1 file)
  • ✅ No syntax errors
  • ✅ Template format validated

📊 Impact

  • Developer Experience: Consistent commit messaging across team
  • Code Quality: Enforces single-purpose commits
  • Fortress Support: Aligns with micro-PR discipline
  • Team Workflow: Foundation for standardized development process

🔧 Usage

Developers can configure git to use this template:

git config commit.template .gitmessage.txt

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:

  • Enforce single-concern commits and best practices through a templated commit structure

Documentation:

  • Add .gitmessage.txt file containing commit types, guidelines, examples, and character limits for commit messages

Summary by CodeRabbit

  • Chores
    • Added a commit message template defining conventional types (feat, fix, chore, refactor, docs, test) and formatting rules (concise, imperative subject, character limits).
    • Includes illustrative examples for each type.
    • No user-facing changes.
  • Documentation
    • Added guidance within the template on writing clear, consistent commit messages, including style rules and examples.

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>
Copilot AI review requested due to automatic review settings September 22, 2025 20:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

@coderabbitai

coderabbitai Bot commented Sep 22, 2025

Copy link
Copy Markdown

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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.

📥 Commits

Reviewing files that changed from the base of the PR and between 5872abf and 69ab78e.

📒 Files selected for processing (1)
  • .gitmessage.txt (1 hunks)

Note

Other AI code review bot(s) detected

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

Walkthrough

Adds 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

Cohort / File(s) Change Summary
Commit template
./.gitmessage.txt
Added commit message template specifying allowed types (feat, fix, chore, refactor, docs, test), formatting rules, and illustrative examples.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

I thump my paws and write with glee,
A tidy template sets us free.
Feat, fix, docs—so neat, so bright,
Imperative lines, concise and light.
No trailing dot, just hop and commit—
A carrot of order in every bit. 🥕

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title "chore: add standardized git commit message template" accurately and concisely describes the primary change — adding a commit message template file. It uses a conventional-commit prefix and directly matches the PR objectives (single-file, development-workflow change). The wording is specific and clear enough for a reviewer or teammate scanning history to understand the main intent.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.

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

Comment @coderabbitai help to get the list of available commands and usage tips.

@sourcery-ai

sourcery-ai Bot commented Sep 22, 2025

Copy link
Copy Markdown
Contributor
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Introduces 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

Change Details Files
Added standardized commit message template
  • Created .gitmessage.txt with commit type definitions (feat, fix, chore, etc.)
  • Outlined formatting guidelines and usage examples
  • Specified character limits and best practices
  • Enforced single-purpose commit rules
.gitmessage.txt

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @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

  • New Commit Message Template: Introduces a .gitmessage.txt file to standardize commit messages, including predefined types (feat, fix, chore, refactor, docs, test), formatting rules, and examples.
  • Enforced Consistency: The template enforces single-purpose commits, subject line character limits, and imperative mood to improve commit history clarity and maintainability.
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 by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description

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

  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.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hey there - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@deepsource-io

deepsource-io Bot commented Sep 22, 2025

Copy link
Copy Markdown
Contributor

Here's the code health analysis summary for commits 72ccb3e..69ab78e. View details on DeepSource ↗.

Analysis Summary

AnalyzerStatusSummaryLink
DeepSource Test coverage LogoTest coverage⚠️ Artifact not reportedTimed out: Artifact was never reportedView Check ↗
DeepSource Python LogoPython✅ SuccessView Check ↗
DeepSource Terraform LogoTerraform✅ SuccessView Check ↗
DeepSource Secrets LogoSecrets✅ SuccessView Check ↗
DeepSource Shell LogoShell✅ SuccessView Check ↗
DeepSource Docker LogoDocker✅ SuccessView Check ↗

💡 If you’re a repository administrator, you can configure the quality gates from the settings.

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

Copy link
Copy Markdown
Contributor

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

Comment thread .gitmessage.txt
Comment on lines +6 to +11
# 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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

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

Comment thread .gitmessage.txt Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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 chore description overlaps with build. 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

📥 Commits

Reviewing files that changed from the base of the PR and between 72ccb3e and 5872abf.

📒 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
@d-ulker d-ulker self-assigned this Sep 22, 2025
@d-ulker
d-ulker merged commit 190289a into main Sep 22, 2025
11 of 13 checks passed
@d-ulker
d-ulker deleted the chore/add-git-message-template branch September 22, 2025 20:49
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