Skip to content

Commit 1da4c44

Browse files
committed
chore: enforce conventional commit messages with a GitHub action
- Add a GitHub Actions workflow to enforce conventional commits - Add commitlint configuration based on my specific preferences
1 parent 7ebe0f8 commit 1da4c44

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
name: Conventional Commits
3+
4+
permissions:
5+
contents: read
6+
7+
on:
8+
pull_request:
9+
branches:
10+
- master
11+
12+
jobs:
13+
commit-lint:
14+
name: Verify Conventional Commits
15+
16+
# Skip this job if this is a release PR
17+
if: (github.event_name == 'pull_request' && !startsWith(github.event.pull_request.head.ref, 'release-please--'))
18+
19+
runs-on: ubuntu-latest
20+
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
with: { fetch-depth: 0 }
25+
26+
- name: Check Commit Messages
27+
uses: wagoid/commitlint-github-action@v6
28+
with: { configFile: .commitlintrc.yml }

0 commit comments

Comments
 (0)