Fetch MR source branch before danger dry_run
What does this MR do?
The danger dry_run
command does seem to not know how to fetch --head $CI_MERGE_REQUEST_SOURCE_BRANCH_SHA
on squash merges with merge trains. See https://gitlab.com/gitlab-org/cli/-/jobs/5377339769 for an example.
I think what’s happening is that the local branch creation failed in this step because the commit wasn’t present, but that this check is not working as intended, so we get a cryptic failure much later on.
The error about danger_h
is because it's the first 8 characters of danger_head
being formatted as a short SHA when raising the error.
Check-list
-
Ensure commits include Changelog:
trailer -
Verify the change in all affected pipelines.
Edited by Hordur Freyr Yngvason