From 72fc98c73d9cccca84e8a2be72bcd89888f2705e Mon Sep 17 00:00:00 2001 From: Jakub Cabal Date: Mon, 11 Nov 2024 16:52:45 +0100 Subject: [PATCH] ci: introduce commitlint From now on the repository follows convetialcommit guidelines. The commitlint tools is there to enforce the law in CI. --- tests/ci/check.gitlab-ci.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/ci/check.gitlab-ci.yaml b/tests/ci/check.gitlab-ci.yaml index 7918a228a..7507005dc 100644 --- a/tests/ci/check.gitlab-ci.yaml +++ b/tests/ci/check.gitlab-ci.yaml @@ -12,3 +12,17 @@ pycodestyle: entrypoint: [""] script: - sh tests/ci/pycodestyle.sh + +commitlint: + stage: check + needs: [] + image: registry.hub.docker.com/library/node:alpine + variables: + GIT_DEPTH: 0 + rules: + - if: $CI_PIPELINE_SOURCE == 'merge_request_event' + before_script: + - apk add --no-cache git + - npm install --save-dev @commitlint/config-conventional @commitlint/cli + script: + - npx commitlint --extends '@commitlint/config-conventional' --from "${CI_MERGE_REQUEST_DIFF_BASE_SHA}" --to "${CI_COMMIT_SHA}"