Skip to content
Snippets Groups Projects
Verified Commit 509820c4 authored by Lars Bilke's avatar Lars Bilke
Browse files

[ci] Fix pre-commit job not picking the correct merge-base sha.

parent 3802f79d
No related branches found
No related tags found
No related merge requests found
......@@ -8,7 +8,7 @@ pre commit:
SKIP: clang-format
script:
- pre-commit install
- TARGET_SHA1=$(git show-ref -s ${CI_MERGE_REQUEST_TARGET_BRANCH_NAME})
- TARGET_SHA1=$(git show-ref -s ${CI_MERGE_REQUEST_TARGET_BRANCH_NAME} | tail -1)
- pre-commit run --from-ref `git merge-base ${TARGET_SHA1} HEAD` --to-ref HEAD
- echo "Target branch is ${CI_MERGE_REQUEST_TARGET_BRANCH_NAME}, target sha is ${TARGET_SHA1}."
- git diff --check `git merge-base ${TARGET_SHA1} HEAD` HEAD -- . ':!*.md' ':!*.pandoc' ':!*.asc' ':!*.dat' ':!*.ts'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment