Reputation: 665
I'm using Gitlab.
I created an issue and then used the "create branch" button in the issue view page.
I worked on the branch and completed and committed around 80% of work.
When I created a merge request from this branch to master and accepted it, the issue was closed automatically.
What was I supposed to do to accept the merge request without closing the issue?
Or maybe it's a git concept that you should merge a branch only when the issue is complete resolved?
Upvotes: 8
Views: 4234
Reputation: 51
You can disable it by setting it like this
Uncheck the checkbox
Auto-close referenced issues on the default branch
Upvotes: 5
Reputation: 3489
Gitlab analyses the commit messages of all commits on the default branch, which is most of the time the master branch.
If it detects an issue pattern, e.g. fixed #<issue number>
, in a commit message, it will close this issue. Git handles also merges with commits, to be more specific by default it will create a merge commit.
Now to the merge request:
If you create a merge request in Gitlab from such kind of specific issue branch, it will automatically fill the commit message with a reference to the source issue. To prevent this you have to delete the commit message before merging.
See the link on the right side which reads Modify Commit Message
, there you will find the pattern.
Upvotes: 7