(Backend)Add a toggle in the `Enable merge trains` section to disable skip merge train
🧩 Problem statement
Right now, when users enable merge train(after enabling pipeline for merged results), Merge immediately
always shows up. Enabling pipeline must succeed only takes into account the recent pipeline(pipeline for merged results) and not the pipeline for merge train. By adding an additional toggle, users would get an option if they want the recent pipeline to be considered or specifically the pipeline for merge trains.
⏳ Background
📝 Proposal
This issue to provide the backend changes for #331356
-
Only allow merging via merge train
When enabled, the Merge immediately option is not available in merge requests. All merge requests must be added to a merge train to merge.
- Remove the line that forces 'merge immediately' to always show for merge trains
- Add a new setting(proposed in #331356), ensure it is persisted to the database and have relevant api endpoints for fetching and persisting the data to the servers