Search code examples
mergegitlabgitlab-api

Accessing Merge Settings via the GitLab API


I would like to view and perhaps change the merge settings in GitLab (see the screenshot). How do I do this via the API?


Screen shot of GitLab Merge settings


Solution

  • 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