Skip to content

Commit 4c9792f

Browse files
authored
docs: improve GitLab CI pipeline job script (#4275)
1 parent 2690a01 commit 4c9792f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/guides/ci-setup.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ lint:commit:
133133
- apk add --no-cache git
134134
- npm install --save-dev @commitlint/config-conventional @commitlint/cli
135135
script:
136-
- echo "${CI_COMMIT_MESSAGE}" | npx commitlint
136+
- npx commitlint --from ${CI_MERGE_REQUEST_DIFF_BASE_SHA} --to ${CI_COMMIT_SHA}
137137
```
138138
139139
GitLab limits `git clone` depth to
@@ -152,7 +152,7 @@ lint:commit:
152152
script:
153153
# Uncomment the next line if you are extending the @commitlint/config-nx-scopes in your commitlint configuration
154154
#- npm i -g nx@$(node -pe "require('./package.json').devDependencies.nx")
155-
- echo "${CI_COMMIT_MESSAGE}" | commitlint
155+
- commitlint --from ${CI_MERGE_REQUEST_DIFF_BASE_SHA} --to ${CI_COMMIT_SHA}
156156
```
157157

158158
## Jenkins X

0 commit comments

Comments
 (0)