summaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
authorRobert Mader <robert.mader@posteo.de>2021-08-24 11:16:10 +0200
committerRobert Mader <robert.mader@posteo.de>2021-08-24 12:00:38 +0200
commit264c625b79e085b6282e4f5f71901d9f59aa376c (patch)
tree4aa60fe95e866f3bb502896063ab1bf8571e9598 /.gitlab-ci.yml
parentcd355b5d74fa1c1b8c246fff57d3fcb9258991b7 (diff)
downloadmutter-264c625b79e085b6282e4f5f71901d9f59aa376c.tar.gz
ci: Fetch the right target branch
And remove a superfluous fallback to the default branch - we already check that the target branch is defined. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1973>
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml4
1 files changed, 2 insertions, 2 deletions
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" ;