Skip to content

Support GitLab "dependent merge request" feature #1402

@bagedevimo

Description

@bagedevimo

GitLab's merge requests support depending on another merge request as a core aspect of the PR. It can only be added after both MRs have been created, as seperate API call, similar to how dependant descriptions are updated in the existing client.py.

# As the description may include the reference to this PR itself (in case of a chain of >=2 PRs),
# let's update the PR description after it's already created (so that we know the current PR's number).

https://docs.gitlab.com/api/merge_requests/#create-a-merge-request-dependency is the relevant API call, and it looks like it would be safe to call to even if the existing dependency exists as it returns 409 in this case.

I'd be willing to give this a go, but I have no idea how to handle this in the client.py such that it's be generic across Github / GitLab?

Metadata

Metadata

Assignees

No one assigned

    Labels

    gitlabRelates to integration with GitLab

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions