-
-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (50 loc) · 1.5 KB
/
Copy pathcommitlint.yml
File metadata and controls
58 lines (50 loc) · 1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# SPDX-FileCopyrightText: 2025 hexaTune LLC
# SPDX-License-Identifier: MIT
name: 🧐 Commit Lint
on:
pull_request:
branches:
- develop
types: [opened, synchronize, edited, reopened, ready_for_review]
permissions:
contents: read
pull-requests: read
jobs:
commitlint:
<<<<<<< Updated upstream
name: Commit Lint (hexaGenMini)
=======
name: Commit Lint (hexaTuneWeb)
>>>>>>> Stashed changes
runs-on: ubuntu-latest
steps:
- name: Checkout (full history)
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Install commitlint deps
run: |
npm i -D @commitlint/cli @commitlint/config-conventional
- name: Show PR commit range (debug)
shell: bash
run: |
git fetch origin ${{ github.base_ref }} --depth=0
BASE=$(git merge-base HEAD origin/${{ github.base_ref }})
echo "Base ref: ${{ github.base_ref }}"
echo "Merge-base: $BASE"
echo "Commits to lint:"
git log --oneline "$BASE..HEAD"
- name: Lint only commits introduced by this PR
shell: bash
run: |
git fetch origin ${{ github.base_ref }} --depth=0
BASE=$(git merge-base HEAD origin/${{ github.base_ref }})
npx commitlint \
--from "$BASE" \
--to "HEAD" \
--config .github/.commitlintrc.yml \
--verbose