Loading
Use instance defaults for source branch removal
What does this MR do and why?
Contributes to #465720 (closed)
Problem
The source branch removal option is hard-coded to enabled for new projects, so administrators cannot choose a different instance default.
Solution
- Store the source branch removal default in application settings.
- Use the instance default when creating projects and forks.
- Expose the setting through the application settings API.
- Document and test the setting across models, services, and the API.
References
Relates to #465720 (closed)
Stack order:
- !260679 (merged): database foundation
- This MR: backend setting, project default, and API
465720-default-remove-source-branch-admin-ui
How to set up and validate locally
- In a Rails console, set the instance default:
ApplicationSetting.current.update!( default_remove_source_branch_after_merge: false ) - Create a new project and verify that source branch removal is disabled by default.
- Create a fork and verify that it uses the instance default.
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist.
Edited by Vasilii Iakliushin