echo -e "Your branch is $commits_behind_count commits behind the target branch, run\n\tgit pull origin $CI_MERGE_REQUEST_TARGET_BRANCH_NAME\nto update."
exit 1
fi
branch-is-up-to-date-with-target-post:
extends:
-.rules-merge-request
stage:postvalidate
tags:
-ivas-basop-linux
script:
-*get-commits-behind-count
-|
if [ $commits_behind_count -ne 0 ]; then
echo -e "Your branch is $commits_behind_count commits behind the target branch, possibly main changed during your pipeline run, run\n\tgit pull origin $CI_MERGE_REQUEST_TARGET_BRANCH_NAME\nto update."