[commit: ghc] wip/cleanup-lint: gitlab-ci: Compute merge base against remote tracking branch (971f453)

git at git.haskell.org git at git.haskell.org
Fri Mar 22 23:00:51 UTC 2019


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/cleanup-lint
Link       : http://ghc.haskell.org/trac/ghc/changeset/971f4530004868b9a043252d6f25081388d99e0d/ghc

>---------------------------------------------------------------

commit 971f4530004868b9a043252d6f25081388d99e0d
Author: Ben Gamari <ben at smart-cactus.org>
Date:   Fri Mar 22 18:49:34 2019 -0400

    gitlab-ci: Compute merge base against remote tracking branch
    
    Previously we would use the local branch with the name
    `$CI_MERGE_REQUEST_TARGET_BRANCH_NAME` to compute the merge base when
    linting. However, this branch isn't necessarily up-to-date. We should
    rather use `origin/$CI_MERGE_REQUEST_TARGET_BRANCH_NAME`.


>---------------------------------------------------------------

971f4530004868b9a043252d6f25081388d99e0d
 .gitlab-ci.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 01fcc6a..f22354a 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -48,7 +48,7 @@ ghc-linters:
   image: "registry.gitlab.haskell.org/ghc/ci-images/linters:$DOCKER_REV"
   script:
     - git fetch origin
-    - base="$(git merge-base $CI_MERGE_REQUEST_TARGET_BRANCH_NAME $CI_COMMIT_SHA)"
+    - base="$(git merge-base origin/$CI_MERGE_REQUEST_TARGET_BRANCH_NAME $CI_COMMIT_SHA)"
     - "echo Merge base $base"
     #    - validate-commit-msg .git $(git rev-list $base..$CI_COMMIT_SHA)
     - validate-whitespace .git $(git rev-list $base..$CI_COMMIT_SHA)



More information about the ghc-commits mailing list