Skip to content
Snippets Groups Projects
Commit cc53a1e9 authored by Alan Nelson's avatar Alan Nelson
Browse files

Use alternate SHA for MR pipelines

parent fc131668
Branches
Tags
3 merge requests!94Merge Request Check Updates,!93Integrate bash script,!91New Merge Request Helper
...@@ -6,6 +6,12 @@ ...@@ -6,6 +6,12 @@
#CI_COMMIT_BEFORE_SHA="" #CI_COMMIT_BEFORE_SHA=""
#CI_COMMIT_SHA="" #CI_COMMIT_SHA=""
# For merge request pipelines, the before SHA is all 0s.
# Replace with a MR specific variable for these pipelines.
if [[ $CI_PIPELINE_SOURCE = 'merge_request_event' ]]; then
CI_COMMIT_BEFORE_SHA="$CI_MERGE_REQUEST_DIFF_BASE_SHA"
fi
# If any commands in this scprt fail, exit with a non-zero exit code # If any commands in this scprt fail, exit with a non-zero exit code
set -e set -e
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment