Skip to content

Add new merge type of single squash merge

Baodong请求将squash_merge合并到main-jh

Related issue:

Follow-up-bug-fix: !1799 (merged)


  • Free
  • JH-only
  • SaaS and Self-managed
  • Under Feature Flag: single_squash_merge_ff

What does this MR do and why?

Add new merge type for GitLab: Single squash merge.

merge_requests_ff_only_enabled: true merge_requests_ff_only_enabled: false
merge_requests_rebase_enabled: true Fast-forward merge Merge commit with semi-linear history
merge_requests_rebase_enabled: false Single Squash merge (always squash) Merge commit

Edge case

If the user sets the project to single squash merge,

and then turns off the feature flag,

then the configuration of this project will fall back to Fast-forward merge.

Screenshots or screen recordings

Live demo: https://drive.google.com/file/d/1cnN592RzdDJhmsNvIRYAzqCaCSoTzxoy/preview

Project settings

截屏2023-06-13_16.41.54

Create MR

截屏2023-06-09_23.37.11

Ready to merge

截屏2023-06-09_23.38.05

Merged 1

截屏2023-06-09_23.38.32

Commit List

截屏2023-06-09_23.38.43

Ready to merge and edit msg

截屏2023-06-09_23.39.22

Merged 2

截屏2023-06-09_23.39.33

Commit List

截屏2023-06-09_23.39.45

How to set up and validate locally

  • checkout current branch
  • turn on FF single_squash_merge_ff
  • restart sidekiq and gitlab

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Baodong 编辑于

合并请求报告

加载中