Require sha on merge api on new groups
What does this MR do and why?
This MR prevents calls to the merge API without a SHA parameter, when require_sha_for_merge setting is enabled somewhere in the settings hierarchy
References
gitlab-org/gitlab#600407+
Screenshots or screen recordings
| Before | After |
|---|---|
How to set up and validate locally
- Create a new group, and open an MR for a project in the group
- Attempt to merge the MR through the API without the SHA param Expectation: Merge blocked with message
SHA must be provided when merging. - Attempt to merge the MR through the API with the SHA param Expectation: Merge successful with
2xxresponse
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