Skip to content

Fix Auto DevOps deploys that use a default branch that's not `master`

What does this MR do?

Related issue: #204646 (closed)

When using Auto DevOps, if the project uses a default branch name that isn't master the Auto DevOps deploy stage won't deploy because of the hard coded references to the master branch.

I tested this on a personal repo, and it seems to "work for me".

The change is hopefully minor as current users who still have the default branch of master aren't impacted and it will continue to work. For those users who use a different default branch name, like main, now get Auto DevOps deploys working again!

This is my first MR to GitLab, so please let me know if anything needs improving.

Edited by Thong Kuah

Merge request reports