Check if pipelines for merge requests are enabled
What does this MR do?
This trigger-build-docs
script is used to preview docs changes by deploying
review apps to the gitlab-docs project.
The branch name of the gitlab-docs project was taken from the CI_MERGE_REQUEST_IID variable, which is only present if pipelines for merge requests are enabled.
With this change, we check if that's the case, otherwise we set a fallback to CI_COMMIT_REF_SLUG.
Relevant discussion in omnibus-gitlab!4026 (comment 309520460).