Skip to content

Fix adding scoped labels to merge requests

Yorick Peterse requested to merge fix-deployment-labeling into master

When adding a scoped label while retaining existing labels of the same scope, GitLab does not (always) add the new scoped label; instead it keeps the old one. This meant that some merge requests would be deployed to production while still having the workflow::canary label; instead of the workflow::production label.

This commit fixes this issue by manually removing the appropriate scoped labels before adding a new one to a merge request.

This fixes https://gitlab.com/gitlab-org/release-tools/issues/393

Merge request reports