Use CI_COMMIT_REF_NAME to prevent pipelines for automatic release candidate merge requests
What does this MR do?
When creating a merge request to merge release-tools/X into a stable branch, using CI_COMMIT_BRANCH still results in a detached pipeline being created, likely due to this variable not being set in that case. To work around this we have to use CI_COMMIT_REF_NAME instead, which is always set to the value we'd expect.
This fixes gitlab-com/gl-infra/delivery#822 (closed)