I would like to view and perhaps change the merge settings in GitLab (see the screenshot). How do I do this via the API?
Asked
Active
Viewed 129 times
1 Answers
1
If this is when creating a project there is a string named "merge_method" & "remove_source_branch_after_merge"
merge_method
remove_source_branch_after_merge
So this would be
GET /projects id/merge_method
for existing projects you can use
https://docs.gitlab.com/ce/api/projects.html#project-merge-method

Will
- 818
- 3
- 14
-
Thanks for your answer. My problem is with existing repos. – csgillespie May 12 '21 at 18:37
-
Actually, the API you've pointed to `GET /projects` does return everything I need: `merge_method` and `remove_source_branch_after_merge`. I just didn't see it before. If you update your answer, I'm happy to award the bounty. – csgillespie May 12 '21 at 18:44
-
many thanks, i also missed the remove_source_branch_after_merge on that one – Will May 12 '21 at 19:05
-
the answer has been adjusted – Will May 13 '21 at 07:45