Expose require_sha_for_merge on group settings API

What does this MR do and why?

This MR exposed the require_sha_for_merge and lock_require_sha_for_merge values on the GET group endpoint api/v4/groups/id and allows for their modification via the PUT on the endpoint.

References

Main epic: https://gitlab.com/groups/gitlab-org/-/work_items/20551+

Screenshots or screen recordings

Before After

How to set up and validate locally

curl --location 'http://gdk.test:3000/api/v4/groups/:id' \
--header 'PRIVATE-TOKEN: glpat-YOURTOKEN' 

# `require_sha_for_merge` and `lock_require_sha_for_merge` should be in the payload
curl --location --request PUT 'http://gdk.test:3000/api/v4/groups/:id' \
--header 'PRIVATE-TOKEN: glpat-YOURTOKEN' \
--header 'Content-Type: application/json' \
--data '{
    "require_sha_for_merge": true,
    "lock_require_sha_for_merge": false
}'

# `require_sha_for_merge` and `lock_require_sha_for_merge` should be updated as specified

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Safwan Ahmed

Merge request reports

Loading
Loading