diff --git a/.github/workflows/commitlint.yml b/.github/workflows/commitlint.yml new file mode 100644 index 0000000..ef661d1 --- /dev/null +++ b/.github/workflows/commitlint.yml @@ -0,0 +1,26 @@ +name: Commitlint + +on: + pull_request: + branches: + - main + +jobs: + commitlint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Setup Node.js environment + uses: actions/setup-node@v4 + with: + node-version: '20' + cache: 'yarn' + + - name: Install dependencies + run: yarn install --frozen-lockfile + + - name: Lint PR title + env: + PR_TITLE: ${{ github.event.pull_request.title }} + run: yarn commitlint --edit "$PR_TITLE" diff --git a/.husky/commit-msg b/.husky/commit-msg deleted file mode 100644 index 70bd3dd..0000000 --- a/.husky/commit-msg +++ /dev/null @@ -1 +0,0 @@ -npx --no-install commitlint --edit "$1"