From 333cc80898dbfa11cc8bd2dc0bb7fcf07302edd0 Mon Sep 17 00:00:00 2001 From: 6arms1leg Date: Sat, 8 Feb 2025 17:18:05 +0100 Subject: [PATCH] docs: improve GitLab CI pipeline job script --- docs/guides/ci-setup.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/guides/ci-setup.md b/docs/guides/ci-setup.md index 2ebb948ed5..c75cba0ebb 100644 --- a/docs/guides/ci-setup.md +++ b/docs/guides/ci-setup.md @@ -133,7 +133,7 @@ lint:commit: - apk add --no-cache git - npm install --save-dev @commitlint/config-conventional @commitlint/cli script: - - echo "${CI_COMMIT_MESSAGE}" | npx commitlint + - npx commitlint --from ${CI_MERGE_REQUEST_DIFF_BASE_SHA} --to ${CI_COMMIT_SHA} ``` GitLab limits `git clone` depth to @@ -152,7 +152,7 @@ lint:commit: script: # Uncomment the next line if you are extending the @commitlint/config-nx-scopes in your commitlint configuration #- npm i -g nx@$(node -pe "require('./package.json').devDependencies.nx") - - echo "${CI_COMMIT_MESSAGE}" | commitlint + - commitlint --from ${CI_MERGE_REQUEST_DIFF_BASE_SHA} --to ${CI_COMMIT_SHA} ``` ## Jenkins X