How the MergeRequest.should_remove_source_branch field is set

An error occurred with my API call:

json: cannot unmarshal bool into Go struct field MergeRequest.should_remove_source_branch of type string

I view the field’s data through the api call, and it is indeed different from the type I defined.

image

I tried to create a pr here, and called the api to see that the value of should_remove_source_branch was null

According to my observation, it is set to true less often, I want to know when should_remove_source_branch will be set to true?

gitlab version:
image

After testing, it is found that it is automatically merged after the setting of the pipeline is successful, and this value will change.

Should false be the default value for bool, using null will introduce unnecessary trouble. @gitlab