Skip to content

Adopt Conventional Commits #19

@milkshakeuk

Description

@milkshakeuk

Description:

This issue proposes adopting the Conventional Commits specification for commit messages in this repository. Conventional Commits is a standardised format for writing commit messages that improves readability, consistency, and automation capabilities.

Benefits of adopting Conventional Commits:

  1. Improves Commit History: Commit messages become more structured and meaningful, making it easier to understand changes in the codebase at a glance.
  2. Enables Automation: Tools like semantic versioning, changelog generation, and release automation can leverage the structured format of Conventional Commits, especially important for releases of the spectral ruleset.
  3. Facilitates Collaboration: A consistent format helps team members quickly understand the purpose of each commit, fostering better collaboration.
  4. Enhances Debugging: By identifying the type and scope of changes (e.g., fix, feat, chore), it becomes easier to trace bugs and understand the evolution of features.
  5. Standardisation Across Teams: Provides a clear, shared standard for writing commit messages, reducing ambiguity and discrepancies.

Proposed Steps:

  1. Update Contribution Guidelines: Add a section in the CONTRIBUTING.md file explaining the Conventional Commits format and providing examples.
  2. Integrate Validation Tools: Set up tools like commitlint to enforce the commit message format during development.
  3. Automate Spectral Ruleset releases: Update release workflows to determine next version based on Conventional Commits, including generation of release notes.

Example Commit Message Format:

<type>[optional scope]: <description>

[optional body]

[optional footer(s)]

Common types include:

  • feat: A new feature
  • fix: A bug fix
  • docs: Documentation updates
  • style: Code style changes (formatting, missing semicolons, etc.)
  • refactor: Code restructuring without changing external behaviour
  • perf: A code change that improves performance
  • test: Adding or updating tests
  • chore: Maintenance tasks (build-related changes, dependency updates)

References:

Sub-issues

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentationenhancementNew feature or request

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions