chore(root): commit-lint workflow
This commit is contained in:
@@ -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) }}
|
||||||
Vendored
+1
@@ -37,6 +37,7 @@
|
|||||||
"tailwindCSS.classAttributes": ["className", "classNames"],
|
"tailwindCSS.classAttributes": ["className", "classNames"],
|
||||||
"tailwindCSS.experimental.configFile": {
|
"tailwindCSS.experimental.configFile": {
|
||||||
"packages/storybook/styles/globals.css": [
|
"packages/storybook/styles/globals.css": [
|
||||||
|
"apps/**",
|
||||||
"packages/react/**",
|
"packages/react/**",
|
||||||
"packages/storybook/**",
|
"packages/storybook/**",
|
||||||
"packages/styles/**"
|
"packages/styles/**"
|
||||||
|
|||||||
+14
-3
@@ -6,14 +6,25 @@ import conventional from "@commitlint/config-conventional";
|
|||||||
const commitLintConfig = {
|
const commitLintConfig = {
|
||||||
extends: ["@commitlint/config-conventional"],
|
extends: ["@commitlint/config-conventional"],
|
||||||
helpUrl: "https://github.com/heroui-inc/heroui/blob/main/CONTRIBUTING.md#commit-convention",
|
helpUrl: "https://github.com/heroui-inc/heroui/blob/main/CONTRIBUTING.md#commit-convention",
|
||||||
plugins: ["commitlint-plugin-function-rules"],
|
|
||||||
rules: {
|
rules: {
|
||||||
...conventional.rules,
|
...conventional.rules,
|
||||||
"function-rules/header-max-length": [0],
|
"header-max-length": [0],
|
||||||
"type-enum": [
|
"type-enum": [
|
||||||
2,
|
2,
|
||||||
"always",
|
"always",
|
||||||
["feat", "feature", "fix", "refactor", "docs", "build", "test", "ci", "chore"],
|
[
|
||||||
|
"feat",
|
||||||
|
"fix",
|
||||||
|
"refactor",
|
||||||
|
"style",
|
||||||
|
"docs",
|
||||||
|
"test",
|
||||||
|
"build",
|
||||||
|
"ci",
|
||||||
|
"chore",
|
||||||
|
"revert",
|
||||||
|
"feature",
|
||||||
|
],
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user