Protect repository branches ignores passed arguments
<!--- Please read this! Before opening a new issue, make sure to search for keywords in the issues filtered by the "regression" or "bug" label. For the Community Edition issue tracker: - https://gitlab.com/gitlab-org/gitlab-ce/issues?label_name%5B%5D=regression - https://gitlab.com/gitlab-org/gitlab-ce/issues?label_name%5B%5D=bug For the Enterprise Edition issue tracker: - https://gitlab.com/gitlab-org/gitlab-ee/issues?label_name%5B%5D=regression - https://gitlab.com/gitlab-org/gitlab-ee/issues?label_name%5B%5D=bug and verify the issue you're about to submit isn't a duplicate. ---> ### Summary When protecting a new branch, the parameters for push access level & merge access level are ignored, and the default values are used. ### Steps to reproduce Simply simply put your gitlab token, the gitlab base url and project id. ``` curl \ --request POST \ --header "Private-Token: ${GITLAB_TOKEN}" \ ${GITLAB_URL}/api/v4/projects/${PROJECT_ID}/protected_branches?name=*-stable&push_access_level=30&merge_access_level=30 ``` This request is directly taken from the CE documentation. https://docs.gitlab.com/ce/api/protected_branches.html#protect-repository-branches ### Example Project Version: 11.0.4 gitlab-ce@edb037cbc85225261e8ede5455be4aad771ba3bb ### What is the current *bug* behavior? ``` {"name":"*-stable","push_access_levels":[{"access_level":40,"access_level_description":"Maintainers"}],"merge_access_levels":[{"access_level":40,"access_level_description":"Maintainers"}]} ``` ### What is the expected *correct* behavior? Push & Merge level should be set to 30.
issue