forked from serious-scaffold/ss-python
-
-
Notifications
You must be signed in to change notification settings - Fork 0
28 lines (28 loc) · 909 Bytes
/
commitlint.yml
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
name: CommitLint
concurrency:
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.ref }}
jobs:
commitlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- run: env | sort
- name: Install commitlint with conventional config
run: npm install --save-dev @commitlint/config-conventional @commitlint/cli
- name: Validate the latest commit message with commitlint
if: github.event_name == 'push'
run: echo "${{ github.event.head_commit.message }}" | npx commitlint
- name: Validate pull request title with commitlint
if: github.event_name == 'pull_request'
run: echo "${{ github.event.pull_request.title }}" | npx commitlint
on:
pull_request:
types:
- opened
- synchronize
- reopened
- edited
push:
branches:
- main