Skip to content

Check protected branches before updating stable

Yorick Peterse requested to merge automatic-rc-check-protected-branches into master

When GitLab Bot tries to merge a merge request for an automatic RC into a stable branch, this can fail if our protected branch rules do not allow for this. In this case the error message is not very helpful, which can be confusing. Today we ran into this case, and found out that for at least several days our protected branch rules did not allow GitLab Bot to merge these merge request.

To make future cases like this easier to deal with, we not check if our protected branch rules allow GitLab Bot to merge. This only works if GitLab Bot is directly listed in the rules, but this is the best we can do using our API at this time.

Merge request reports