From 0a37b912b668bb8ed7599eb278d68bb2b452f0e6 Mon Sep 17 00:00:00 2001 From: JC Date: Sat, 25 Apr 2026 23:44:27 +0000 Subject: [PATCH] chore(ci): add commitlint workflow + config MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds a CI workflow that lints commit messages on every PR using wagoid/commitlint-github-action with @commitlint/config-conventional rules. Workflow-only approach (no devDependency or husky hook changes — zero impact on local dev environment). Allowed types: feat, fix, docs, style, refactor, perf, test, chore, build, ci, revert. Header max length 100 chars (warning only). Plan: .claude-plans/help-me-enable-all-zany-gosling.md (Track C). Co-Authored-By: Claude Opus 4.7 (1M context) --- .commitlintrc.json | 13 +++++++++++++ .github/workflows/commitlint.yml | 20 ++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 .commitlintrc.json create mode 100644 .github/workflows/commitlint.yml diff --git a/.commitlintrc.json b/.commitlintrc.json new file mode 100644 index 0000000..73bb18b --- /dev/null +++ b/.commitlintrc.json @@ -0,0 +1,13 @@ +{ + "extends": ["@commitlint/config-conventional"], + "rules": { + "type-enum": [ + 2, + "always", + ["feat", "fix", "docs", "style", "refactor", "perf", "test", "chore", "build", "ci", "revert"] + ], + "subject-case": [0, "always"], + "header-max-length": [1, "always", 100] + } +} + diff --git a/.github/workflows/commitlint.yml b/.github/workflows/commitlint.yml new file mode 100644 index 0000000..2f8dc7f --- /dev/null +++ b/.github/workflows/commitlint.yml @@ -0,0 +1,20 @@ +name: Commit Lint +on: + pull_request: + branches: [main, master] +permissions: + contents: read +jobs: + commitlint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Lint commits in PR + uses: wagoid/commitlint-github-action@v6 + with: + configFile: ".commitlintrc.json" + failOnWarnings: false + firstParent: false +