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?
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.
git-machete/git_machete/client.py
Lines 2931 to 2932 in 140e278
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?