How do I integrate branch deploys with GitLab review apps?

Thanks to the Continuous Deployment settings in Netlify, deploying Merge Requests are quite easy.

But we found that when builds are not triggered form GitLab CI, it is very hard to link those deploy previews into the MR environment URL.

I know Netlify has webhook notifications, but it seems that GitLab has no known way to attach URL to the environment/MR other than gitlab-ci.yml, but then Netlify branch deploys has no documented way to manually specify sub-domains, even with the “–” namespace.

Is there a workaround for this situation?

Answering my own question, and for others in the future.

Last year Netlify decided to ditch the whole developer experience created by GitLab and go with a random comment in the GitLab MR to track it.

  1. Source discussion in GitLab
  2. The Netlify’s way to add that comment with your own name.

thanks for showing us what you came up with! That’s definitely helpful to others!