Conventional Commits Integration Summary

November 8, 2025 · View on GitHub

Date: November 2025 Project: Logseq Template Graph Integration: git-conventional-commits by qoomon


Overview

This document summarizes the integration of Conventional Commits into the Logseq Template Graph project, enabling automated changelog generation, semantic versioning, and standardized commit messages.


What Was Integrated

1. Core Tool: git-conventional-commits

Source:

Capabilities:

  • ✅ Validate commit messages against conventional commits format
  • ✅ Generate changelogs automatically from commit history
  • ✅ Determine semantic version bumps (major.minor.patch)
  • ✅ Support customizable commit types and scopes
  • ✅ Integrate with CI/CD workflows

Files Created/Modified

New Files

FilePurpose
git-conventional-commits.yamlConfiguration for commit types, scopes, and changelog generation
package.jsonNPM dependencies and scripts for conventional commits tooling
.git-hooks/commit-msgGit hook for Unix/Linux commit message validation
.git-hooks/commit-msg.ps1Git hook for Windows PowerShell validation
scripts/setup-hooks.shUnix/Linux setup script for git hooks
scripts/setup-hooks.ps1Windows PowerShell setup script for git hooks
.github/workflows/validate-commits.ymlGitHub Actions workflow to validate PR commits
CONTRIBUTING.mdComplete contributing guide with commit standards
docs/developer-guide/conventional-commits-guide.mdComprehensive guide for conventional commits
docs/developer-guide/conventional-commits-integration.mdThis file - integration summary

Modified Files

FileChanges
CLAUDE.mdUpdated Git Workflow section with conventional commits guidelines
.github/workflows/release.ymlEnhanced to generate changelogs from commits automatically
.gitignoreAdded node_modules and conventional commits temp files
docs/README.mdAdded links to Contributing and Conventional Commits guides

Configuration Details

Commit Types

TypeDescriptionChangelogVersion Bump
featNew features or enhancements✅ YesMinor (0.x.0)
fixBug fixes✅ YesPatch (0.0.x)
docsDocumentation changes✅ Yes-
styleCode formatting (no logic)❌ No-
refactorCode restructuring✅ Yes-
perfPerformance improvements✅ Yes-
testTest additions/corrections❌ No-
buildBuild system, dependencies✅ Yes-
opsInfrastructure, deployment❌ No-
choreMiscellaneous❌ No-

Commit Scopes

Project-specific scopes defined for clarity:

  • templates - .edn template files
  • classes - Schema.org class definitions
  • properties - Schema.org property definitions
  • ci - CI/CD pipeline changes
  • scripts - Build/export/validation scripts
  • docs - Documentation
  • release - Release process
  • modular - Modular architecture
  • workflow - Development workflow

Usage

Quick Start

# 1. Install dependencies
npm install

# 2. Setup git hooks (automatic validation)
npm run setup

# 3. Make a commit
git commit -m "feat(classes): add Recipe class with cookTime property"

Available NPM Scripts

npm run setup              # Setup git hooks for validation
npm run version            # Determine next version from commits
npm run changelog          # Generate changelog preview
npm run changelog:write    # Write changelog to CHANGELOG.md
npm run validate:commits   # Manually validate commit message

Commit Message Format

<type>(<scope>): <description>

[optional body]

[optional footer(s)]

Examples:

# Simple feature
git commit -m "feat(classes): add Recipe class"

# Bug fix with scope
git commit -m "fix(templates): correct spouse cardinality"

# Documentation
git commit -m "docs: update installation guide"

# Breaking change
git commit -m "feat(classes)!: remove deprecated Customer class

BREAKING CHANGE: Use Person class with customerRole property instead"

Automation

Git Hooks

Pre-commit validation ensures all commits follow the format:

  • Unix/Linux: .git-hooks/commit-msg (Bash script)
  • Windows: .git-hooks/commit-msg.ps1 (PowerShell script)

Invalid commits are rejected with helpful error messages.

GitHub Actions

1. Validate Commits Workflow

File: .github/workflows/validate-commits.yml

Triggers: Pull requests (opened, synchronized, reopened)

Action: Validates all commits in the PR against conventional commits format

Output: Comments on PR if commits don't follow the standard

2. Enhanced Release Workflow

File: .github/workflows/release.yml

Enhancements:

  • Automatically generates changelog from conventional commits
  • Falls back to existing CHANGELOG.md if generation fails
  • Includes download instructions and template statistics

Workflow:

  1. Checkout with full history (fetch-depth: 0)
  2. Install Node.js and dependencies
  3. Generate changelog using npx git-conventional-commits
  4. Create GitHub release with generated notes

Benefits

1. Automated Changelog Generation

Before:

# Manually write CHANGELOG.md entries
vim CHANGELOG.md
# Add entries manually...
git commit -m "update changelog"

After:

# Automatic generation from commits
npm run changelog:write
git commit -am "docs(release): update changelog for v0.3.0"

2. Semantic Versioning

Before:

# Manually determine version
# Is it 0.3.0 or 0.2.1?
git tag v0.3.0

After:

# Automatic version based on commits
npm run version
# Output: 0.3.0 (feat commits = minor bump)

3. Consistent Commit History

Before:

added new stuff
fix bug
update templates
WIP

After:

feat(classes): add Recipe class with cookTime property
fix(templates): correct spouse cardinality from :many to :one
docs: update installation instructions
chore(templates): auto-export templates

4. Better Collaboration

  • Developers know exactly what format to use
  • Reviewers can quickly understand changes
  • Users get clear, organized changelogs
  • Automation works reliably

Migration Guide

For Existing Contributors

  1. Install dependencies:

    npm install
    
  2. Setup git hooks:

    npm run setup
    
  3. Update commit habits:

    # Old way
    git commit -m "added Recipe class"
    
    # New way
    git commit -m "feat(classes): add Recipe class"
    
  4. If commit is rejected:

    # Fix the message format
    git commit --amend -m "feat(classes): add Recipe class"
    

For New Contributors

Follow the CONTRIBUTING.md guide which includes conventional commits from the start.


Troubleshooting

Hook Not Running

# Re-run setup
npm run setup

# Verify git config
git config core.hooksPath
# Should output: .git-hooks

Commit Rejected

# Error shows expected format
git commit -m "added stuff"
# ❌ Rejected with helpful message

# Fix and retry
git commit -m "feat(classes): add Recipe class"
# ✅ Accepted

Bypass Validation (Emergency)

# Not recommended, but available
git commit --no-verify -m "emergency fix"

Changelog Not Generating

# Check configuration
cat git-conventional-commits.yaml

# Verify commits exist
git log --oneline

# Test manually
npm run changelog

Next Steps

  1. Update existing commits (optional):

    • Review recent commit history
    • Use interactive rebase to rewrite messages (if not pushed)
    • Document any non-standard commits
  2. Update documentation links:

    • Ensure all docs reference CONTRIBUTING.md
    • Add conventional commits badge to README
    • Update quick start guides
  3. Team communication:

    • Notify all contributors of new requirements
    • Share CONTRIBUTING.md and conventional commits guide
    • Provide examples and answer questions
  4. Monitor adoption:

    • Review PRs for proper commit format
    • Provide gentle feedback and guidance
    • Update docs based on common questions

Future Enhancements

  • Add commit message template (.gitmessage)
  • Create VS Code snippets for common commits
  • Add commit-lint for more advanced validation
  • Integrate with semantic-release for full automation
  • Add conventional commits badge to README
  • Create video tutorial on conventional commits workflow

Resources

Official Documentation

Project Documentation

Examples


Questions or Issues?


Integration Completed: November 2025 Maintained By: Logseq Template Graph Contributors License: MIT