Skip to content

GitLab: use merge request dependency for stacked MRs #8211

Open
@nolith

Description

@nolith

I enjoy the stacked branches feature, now that PRs landed on GitLab I can see a missing feature compared to what I used to do in the past when I had to create my merge requests manually.

In GitLab (Premium and Ultimate) you can declare merge request dependencies. When creating a stack I set each MR as depending on the one before.

The effect of this is that you must merge the stack from the bottom, and as you merge each MR, the next one will automatically change its target branch from the previous MR to the default branch.

MR dependencies can be set with a simple API call and it will return a 403 error if the project doesn't have at least a Premium license.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementAn improvement to an existing feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions