grokify avatar

commit-classification

Classifies commits according to conventional commits specification and maps them to changelog catego

by grokify|Open Source

Commit Classification

Classifies commits according to conventional commits specification and maps them to changelog categories

Instructions

Guidelines for classifying commits using Conventional Commits specification.

Commit Types

TypeDescriptionChangelog Category
featNew featureAdded
fixBug fixFixed
docsDocumentation onlyDocumentation
styleFormatting, no code change-
refactorCode change, no feature/fixChanged
perfPerformance improvementPerformance
testAdding/fixing tests-
buildBuild system changes-
ciCI configuration-
choreMaintenance tasks-

Changelog Categories

Map commit types to Keep a Changelog categories:

Changelog CategoryCommit Types
Addedfeat
Changedrefactor, perf
DeprecatedManual marking
RemovedManual marking
Fixedfix
Securityfix with security scope

Scope Guidelines

Scopes provide context:

feat(auth): add OAuth2 support
fix(api): handle timeout errors
docs(readme): update installation steps

Common scopes:

  • api - API changes
  • cli - Command-line interface
  • auth - Authentication
  • db - Database
  • ui - User interface
  • core - Core functionality

Breaking Changes

Mark breaking changes with:

  1. ! after type: feat!: new API
  2. Footer: BREAKING CHANGE: description

Both trigger MAJOR version bump.

Commit Message Format

<type>[optional scope]: <description>

[optional body]

[optional footer(s)]

Examples:

feat(auth): add OAuth2 login support

Implements OAuth2 flow with support for Google and GitHub providers.

Closes #123
fix!: change error response format

BREAKING CHANGE: Error responses now use RFC 7807 format.
Migration guide: https://example.com/migrate

Classification Tools

Use schangelog for automatic classification:

schangelog parse-commits --since=v1.0.0

Output provides:

  • Parsed type and scope
  • Suggested changelog category
  • Breaking change detection