-
Notifications
You must be signed in to change notification settings - Fork 3
/
lint.yml
executable file
·39 lines (36 loc) · 1.35 KB
/
lint.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
29
30
31
32
33
34
35
36
37
38
39
description: |
Add this lint job to your workflow to easily enable commit message lint checking as a step in your CI process.
docker:
- image: "cimg/node:<<parameters.node-version>>"
parameters:
config-path:
type: string
description: Path to commitlint config file
default: "./commitlint.config.js"
configs:
type: string
description: A space-separated list of commitlint config packages to install.
default: "@commitlint/config-conventional"
target-branch:
type: string
description: Commits in the current branch will be compared against the target branch for linting. All commits not present in the target branch will be linted.
default: "main"
node-version:
type: string
default: "16.5.0"
description: "Specify the NodeJS version used to run the commitlint job. This should not usually need to be changed."
max-count:
type: integer
default: 10
description: "The maximum number of commits to lint."
steps:
- checkout
- run:
name: "Run commitlint"
environment:
CL_PARAM_CONFIG_PATH: "<<parameters.config-path>>"
CL_PARAM_NODE_VERSION: "<<parameters.node-version>>"
CL_PARAM_TARGET_BRANCH: "<<parameters.target-branch>>"
CL_PARAM_CONFIGS: "<<parameters.configs>>"
CL_PARAM_MAX_COUNT: "<<parameters.max-count>>"
command: <<include(scripts/lint.sh)>>