It might actually be a bug
. 我很有信心用
SHA
我们的代码库中的变量,但它也遇到同样的问题。我为你的工作找到了一个解决办法:
lint commit messages:
stage: test
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
script:
- git fetch
- poetry run gitlint --commits "origin/${CI_MERGE_REQUEST_TARGET_BRANCH_NAME}..origin/${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME}"
我换上了电视
rules
语法,
GitLab recommends doing so
规则语法是一种改进的、更强大的解决方案,用于定义作业何时应该运行。考虑使用规则,而不是只使用/except,以最大限度地利用管道。
结果:
$ poetry install
Installing dependencies from lock file
No dependencies to install or update
$ git fetch
From https://gitlab.com/KiwiKilian/pacman-package-file
* [new branch] lint -> origin/lint
* [new branch] master -> origin/master
$ poetry run gitlint --commits "origin/${CI_MERGE_REQUEST_TARGET_BRANCH_NAME}..origin/${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME}"
Commit 7c9f4e7c1a:
1: CT1 Title does not start with one of fix, feat, chore, docs, style, refactor, perf, test, revert, ci, build: "Ignore IDEA configuration"
1: CT1 Title does not follow ConventionalCommits.org format 'type(optional-scope): description': "Ignore IDEA configuration"
Cleaning up file based variables
00:00
ERROR: Job failed: exit code 1