chore(root): commit-lint workflow

This commit is contained in:
Tianen Pang
2025-09-30 02:21:52 +08:00
parent 6b4c911498
commit 4702573cd0
3 changed files with 58 additions and 3 deletions
+43
View File
@@ -0,0 +1,43 @@
name: Commitlint
on:
push:
branches: [main, canary, v3]
pull_request:
branches: [main, canary, v3]
permissions:
contents: read
pull-requests: read
jobs:
commitlint:
runs-on: ubuntu-latest
steps:
- name: Checkout codebase
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install dependencies
uses: ./.github/common-actions/install
- name: Print versions
run: |
git --version
node --version
pnpm --version
pnpm commitlint --version
- name: Run commitlint
id: run_commitlint
uses: wagoid/commitlint-github-action@v6
env:
NODE_PATH: ${{ github.workspace }}/node_modules
with:
configFile: commitlint.config.mjs
- name: Show outputs
if: ${{ always() }}
run: echo ${{ toJSON(steps.run_commitlint.outputs.results) }}
+1
View File
@@ -37,6 +37,7 @@
"tailwindCSS.classAttributes": ["className", "classNames"],
"tailwindCSS.experimental.configFile": {
"packages/storybook/styles/globals.css": [
"apps/**",
"packages/react/**",
"packages/storybook/**",
"packages/styles/**"
+14 -3
View File
@@ -6,14 +6,25 @@ import conventional from "@commitlint/config-conventional";
const commitLintConfig = {
extends: ["@commitlint/config-conventional"],
helpUrl: "https://github.com/heroui-inc/heroui/blob/main/CONTRIBUTING.md#commit-convention",
plugins: ["commitlint-plugin-function-rules"],
rules: {
...conventional.rules,
"function-rules/header-max-length": [0],
"header-max-length": [0],
"type-enum": [
2,
"always",
["feat", "feature", "fix", "refactor", "docs", "build", "test", "ci", "chore"],
[
"feat",
"fix",
"refactor",
"style",
"docs",
"test",
"build",
"ci",
"chore",
"revert",
"feature",
],
],
},
};