secret_detection job fails to run on merge train from fork
Problem
Inside of the gitlab-org/gitlab-runner
we have secret_detection
enabled. This works for most cases, however it fails for the following secanrio:
- Piplines for Merged Results enabled
- Open a merge request from a fork targeting the upstream repository.
- Add merge request to merge train
You will get the following error:
$ git fetch origin $CI_DEFAULT_BRANCH $CI_BUILD_REF_NAME
fatal: couldn't find remote ref resmo-master-patch-95694
Because the CI_BUILD_REF_NAME
is pointing to a ref that doesn't exist since that ref only exists for cloning.
/cc @theoretick @zrice