forked from nodejs/node-core-utils
-
Notifications
You must be signed in to change notification settings - Fork 0
29 lines (26 loc) · 775 Bytes
/
commitlint.yml
File metadata and controls
29 lines (26 loc) · 775 Bytes
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
name: Conventional Commit Linter
on:
push:
branches:
- main
pull_request:
permissions:
contents: read
jobs:
commitlint:
runs-on: ubuntu-latest
steps:
- name: Compute number of commits to fetch
id: nb-of-commits
# `+ 1` for PRs because of the merge commit
run: |
echo "toParse=$(echo "$EVENT" | jq -r 'if .commits then (.commits | length) else (.pull_request.commits + 1) end')" >> $GITHUB_OUTPUT
env:
EVENT: ${{ toJSON(github.event) }}
- name: Checkout
uses: actions/checkout@v6
with:
persist-credentials: false
sparse-checkout: .
fetch-depth: ${{ steps.nb-of-commits.outputs.toParse }}
- uses: wagoid/commitlint-github-action@v6