Skip to content

Commit

Permalink
Merge pull request #3 from ej-shafran/ci-commitlint
Browse files Browse the repository at this point in the history
ci(actions): add commitlint checks
  • Loading branch information
ej-shafran authored Oct 22, 2024
2 parents bf139c0 + 851d3fe commit 8fe5777
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ jobs:
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup PNPM 🔨
uses: pnpm/action-setup@v4
Expand All @@ -24,6 +26,16 @@ jobs:
run: |
pnpm install
- name: Validate Last Commit Message 🔖
if: github.event_name == 'push'
run: |
pnpm commitlint --verbose --last
- name: Validate All Commit Messages 🔖
if: github.event_name == 'pull_request'
run: |
pnpm commitlint --verbose --from ${{ github.event.pull_request.head.sha }}~${{ github.event.pull_request.commits }} --to ${{ github.event.pull_request.head.sha }}
- name: Check Formatting 📚
run: |
pnpm format:check
Expand Down
2 changes: 1 addition & 1 deletion .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1 +1 @@
pnpm commitlint ${1}
pnpm commitlint --edit ${1}
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"format": "prettier --write .",
"format:check": "prettier --check .",
"prepare": "husky",
"commitlint": "commitlint --edit",
"lint": "eslint .",
"test": "vitest run",
"test:watch": "vitest dev"
Expand Down

0 comments on commit 8fe5777

Please sign in to comment.