Skip to content

Improve spec context description for commit message area

Issue #122800 (closed)

What does this MR do?

Improving the spec description so it better explain what the testing scenario it is trying to cover.

Additional Info

(Copying some discussion from the issue so to give a better understanding of what this MR is trying to achieve)

At first, the original issue was to add an additional test to cover this:

Do we also need to handle cases where fast forward merge is not enabled?

But we already have tests for that case.

After more digging (and with help from @MadLittleMods), turns out what the section of the code is testing for this scenario:

So when using merge commits is pointing when the user has selected this:

https://docs.gitlab.com/ee/user/project/settings/#merge-request-settings

So what is this MR trying to do

Well, at first glance and based on the current wording, it's hard to decipher what it was trying to do. @ekigbo put it nicely:

I think it might still be worth updating, so it's pretty clear what's happening in that test block, I've not worked closely in this part of the code, so at a glance, I wouldn't (and didn't) necessary understand that not having fast-forward merge enabled means that I'm using merge commits, it makes sense, but only after some thought.

Just on that alone, I think we can improve the wording of this test block, so it's more clear what it is trying to achieve 🤞

Closes #122800 (closed)

Edited by Samantha Ming

Merge request reports