Skip to content

Commit 57a18c4

Browse files
committed
Branding and Integration
1 parent 83f15b2 commit 57a18c4

File tree

8 files changed

+1401
-41
lines changed

8 files changed

+1401
-41
lines changed

.github/workflows/commit-lint.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Commit Message Validation
2+
3+
on:
4+
push:
5+
branches: [ main, develop ]
6+
pull_request:
7+
branches: [ main, develop ]
8+
9+
jobs:
10+
commit-lint:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0 # Fetch all history to check commits
18+
19+
- name: Setup Node.js
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: '18'
23+
cache: 'npm'
24+
25+
- name: Install dependencies
26+
run: npm ci
27+
28+
- name: Build project
29+
run: npm run build
30+
31+
- name: Validate commit message
32+
run: npm run check
33+
# Alternative: use the CLI directly
34+
# run: npx commitweave check
35+
36+
- name: Validate all commits in PR (for pull requests)
37+
if: github.event_name == 'pull_request'
38+
run: |
39+
# Check all commits in the PR
40+
for commit in $(git rev-list ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }}); do
41+
echo "Checking commit: $commit"
42+
git log -1 --pretty=%B $commit | npx tsx scripts/check-commit.ts || exit 1
43+
done

0 commit comments

Comments
 (0)