Skip to main content

Commit Message Template

Template​

<type>(<scope>): <subject>

[optional body]

[optional footer(s)]

# Type must be one of the following:
# feat: A new feature
# fix: A bug fix
# docs: Documentation only changes
# style: Changes that do not affect the meaning of the code
# refactor: A 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
# chore: Changes to the build process or auxiliary tools
#
# Scope should be the area of code being changed:
# (auth) - Authentication related changes
# (api) - API related changes
# (ui) - User interface changes
# (db) - Database related changes
# etc.
#
# Subject should:
# - be no greater than 50 characters
# - begin with a capital letter
# - not end with a period
# - use imperative mood ("Add feature" not "Added feature")
#
# Body should:
# - be wrapped at 72 characters
# - explain what and why vs. how
#
# Footer should contain any reference to GitHub issues:
# Fixes #123, #456
# Breaking change: <description>

Usage Guide​

When to Use​

  • Every code commit
  • Every documentation change
  • Every configuration update
  • Every dependency update

Best Practices​

  1. Type Selection

    • Choose the most specific type
    • Use feat for new features
    • Use fix for bug fixes
    • Use docs for documentation
  2. Scope

    • Keep it concise
    • Use consistent naming
    • Match project structure
    • Omit if affecting multiple areas
  3. Subject Line

    • Be specific
    • Use imperative mood
    • Keep it under 50 chars
    • No period at end
  4. Body

    • Explain why, not how
    • Wrap at 72 chars
    • Use bullet points for multiple items
    • Include context
  5. Footer

    • Reference issues
    • Note breaking changes
    • Mention reviewers if needed
    • Include JIRA tickets

Examples​

Feature Addition​

feat(auth): Add OAuth2 support for Google login

Implement OAuth2 authentication flow with Google provider to allow users
to sign in with their Google accounts. This includes:
- Google OAuth2 client setup
- Token validation
- User profile mapping
- Session management

Fixes #123

Bug Fix​

fix(api): Prevent duplicate user registration

Add unique constraint and error handling for email addresses during
registration to prevent users from creating multiple accounts with
the same email address.

Fixes #456

Breaking Change​

feat(db): Migrate user schema to support multiple auth providers

BREAKING CHANGE: User authentication fields have been restructured to
support multiple OAuth providers. This requires existing applications
to update their user queries and mutations.

- Added provider_id field
- Added provider_type enum
- Deprecated password field for OAuth users

Migration guide: docs/migrations/auth-providers.md
Fixes #789

Documentation Update​

docs(readme): Update deployment instructions

Update the deployment guide with new environment variables and
configuration steps for the OAuth2 integration.

Related to #123

Performance Improvement​

perf(api): Optimize user search query

Add database index on email and username fields to improve search
performance. Query execution time reduced from 2s to 200ms.

Fixes #234