Michael Davidson
Michael Davidson

Reputation: 537

Chain multiple merge requests together in GitLab

Is there a way to lock one merge request's status until another merge request passes?

e.g. if I am submitting API changes to an API project and frontend changes to a frontend project, I don't want the API changes to pass without the frontend changes or vice versa and I want to lock them together so the app won't break if my merge request gets approved. These are on different projects entirely but they rely on each other.

Upvotes: 7

Views: 13942

Answers (2)

Elliot
Elliot

Reputation: 1693

GitLab released merge request dependencies in 12.2 (as a premium feature) which solve this exact issue. Merge request A can declare a dependency on merge request B which will block A from being merged until B is merged. This works across projects.

Upvotes: 8

kowsky
kowsky

Reputation: 14539

We also have this problem from time to time. You can mark the frontends' merge request as work in progress by adding WIP in the beginning of the merge requests title. This will prevent the it from being merged. However, you have to remove the WIP manually when the API merge request is merged. Not an elegant solution, but the only one we came up with.

Edit: Well, the only one that does not involve yelling "Dude, do not merge that until Steve merged his!"

Upvotes: 4

Related Questions