From 0b7bb781d1d6ef40a84b34d0e771fcc60dcbd3b6 Mon Sep 17 00:00:00 2001 From: Marco Clemencic <marco.clemencic@cern.ch> Date: Mon, 28 Oct 2024 10:36:26 +0100 Subject: [PATCH] Get MR target commit for pre-commit from upstream remote --- .gitlab-ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 76944a808b..50167b1ce8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -11,6 +11,7 @@ variables: CMAKE_GENERATOR: 'Ninja' # default build system TARGET_BRANCH: master + TARGET_REPOSITORY: https://gitlab.cern.ch/gaudi/Gaudi.git # Job templates .build: &template_build @@ -260,10 +261,11 @@ pre-commit-checks: - ${PRE_COMMIT_HOME} before_script: - | + set -x python -m venv ${CI_PROJECT_DIR}/.cache/pre-commit-venv . ${CI_PROJECT_DIR}/.cache/pre-commit-venv/bin/activate pip install pre-commit - git fetch origin $TARGET_BRANCH + git fetch $TARGET_REPOSITORY $TARGET_BRANCH git config user.name "Gitlab CI" git config user.email "noreply@cern.ch" script: -- GitLab