Skip to content

Commit 0ca6b46

Browse files
committed
Merge branch 'jt/gitlab-ci-base-fix'
Two CI tasks, whitespace check and style check, work on the difference from the base version and the version being checked, but the base was computed incorrectly in GitLab CI in some cases, which has been corrected. * jt/gitlab-ci-base-fix: ci: fix base commit fallback for check-whitespace and check-style
2 parents 34736ff + acc4fb3 commit 0ca6b46

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.gitlab-ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ check-whitespace:
216216
# be defined in all pipelines.
217217
script:
218218
- |
219-
R=${CI_MERGE_REQUEST_TARGET_BRANCH_SHA-${CI_MERGE_REQUEST_DIFF_BASE_SHA:?}} || exit
219+
R=${CI_MERGE_REQUEST_TARGET_BRANCH_SHA:-${CI_MERGE_REQUEST_DIFF_BASE_SHA:?}} || exit
220220
./ci/check-whitespace.sh "$R"
221221
rules:
222222
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
@@ -236,7 +236,7 @@ check-style:
236236
# be defined in all pipelines.
237237
script:
238238
- |
239-
R=${CI_MERGE_REQUEST_TARGET_BRANCH_SHA-${CI_MERGE_REQUEST_DIFF_BASE_SHA:?}} || exit
239+
R=${CI_MERGE_REQUEST_TARGET_BRANCH_SHA:-${CI_MERGE_REQUEST_DIFF_BASE_SHA:?}} || exit
240240
./ci/run-style-check.sh "$R"
241241
rules:
242242
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'

0 commit comments

Comments
 (0)