diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 697c71f05..50400e736 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -151,8 +151,8 @@ check-code-style: script: - if [[ x"$CI_MERGE_REQUEST_TARGET_BRANCH_NAME" != "x" ]] ; then - git fetch origin master; - export common_parent_sha=$(diff --old-line-format='' --new-line-format='' <(git rev-list --first-parent "origin/${CI_MERGE_REQUEST_TARGET_BRANCH_NAME:-${CI_DEFAULT_BRANCH}}") <(git rev-list --first-parent HEAD) | head -1) ; + git fetch origin $CI_MERGE_REQUEST_TARGET_BRANCH_NAME ; + export common_parent_sha=$(diff --old-line-format='' --new-line-format='' <(git rev-list --first-parent "origin/$CI_MERGE_REQUEST_TARGET_BRANCH_NAME") <(git rev-list --first-parent HEAD) | head -1) ; python3 -u ./check-style.py --dry-run --sha $common_parent_sha ; else echo "Not a merge request" ;