Skip to content

Commit 2dafa43

Browse files
authored
Merge pull request #313 from jokeyrhyme/commitlint-shared-config
👷 ci: adopt shared commitlint config for `gimoji`
2 parents 4c811f7 + ff369e8 commit 2dafa43

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

.commitlintrc.mjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export default {
2+
extends: ["@gimoji/commitlint-config-gimoji"],
3+
};

.github/workflows/commitlint.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# https://commitlint.js.org/guides/ci-setup.html
2+
3+
name: commitlint
4+
5+
on: [push, pull_request]
6+
7+
permissions:
8+
contents: read
9+
10+
jobs:
11+
commitlint:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v6
15+
with:
16+
fetch-depth: 0
17+
- name: Setup node
18+
uses: actions/setup-node@v6
19+
with:
20+
node-version: lts/*
21+
22+
- name: Validate PR commits with commitlint
23+
if: github.event_name == 'pull_request'
24+
run: npm exec --package @commitlint/cli --package @gimoji/commitlint-config-gimoji --package @gimoji/commitlint-plugin-gimoji --yes -- commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose

0 commit comments

Comments
 (0)