Merge Requests created through an API call (v4 w/ no value provided, or via GraphQL) should respect "Enable 'Delete source branch' option by default " project-level option
Problem to solve
For tools that use the API (the v4 or the GraphQL) that does not provide a value for remove_source_branch -- the value should default to whatever the project's "Enable 'Delete source branch' option by default " value is. This would be the expected behaviour for tools using the API such as editor integration.
Intended users
- Sasha (Software Developer) ( Via some editor plugin, such as magit forge )
User experience goal
For a user who uses methods other than the web UI to create Merge Requests, it's expected that the same defaults would be provided, given their tools did not explicitely over-ride it. ( For example, by not providing the field in the API Call, as it is marked as optional )
Proposal
The API Should be made to default the value of remove_source_branch (v4) to the relevent option, just as the Web UI does.
Further details
Permissions and Security
Documentation
Documentation for the v4 API would need to be updated to reflect this new functionality when the value is not provided.