Add endpoint POST /projects/:id/repository/merge
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Release notes
So far no Gitlab API endpoint for merging two branches is available. Adding such an endpoint can help to speed up automatic processes when merging (feature-)branches.
Problem to solve
Make it possible to merge two branches with the Gitlab API
Proposal
Create an additional endpoint
POST /projects/:id/repository/merge
similar to:
-
POST /projects/:id/repository/commits
but adding attributesfrom:str
to specify branch/ref to merge from,strategy:Literal["theirs","ours"]
for the merge strategy anddry_run:Optional[bool]
to test if a merge is possible or POST /projects/:id/repository/commits/:sha/cherry_pick
Intended users
Developers, DevOps
All users/processes, using the Gitlab API to operate on git repositories.
With the API endpoints commits
, branchs
, and cherry_pick
there are very powerful ways to automate processes between branches. The additional endpoint would
Feature Usage Metrics
Edited by 🤖 GitLab Bot 🤖