Commit a3a8798a authored by Douwe Maan's avatar Douwe Maan

Merge branch 'fix-auto-mr-close' into 'master'

Fix auto-MR-close text from branch name

## What does this MR do?

Fix the MR-auto-close feature if a branch name begins with an issue IID.

## Are there points in the code the reviewer needs to double check?

It's one line, so check that line thoroughly 😃

## Why was this MR needed?

When I create a new MR from a branch starting with an issue IID, the description doesn't get suffixed with the 'Closes #blahblah' that it should do.

## What are the relevant issue numbers?

Don't think there are any.

## Screenshots (if relevant)

## Does this MR meet the acceptance criteria?

- [ ] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added

See merge request !4836
parents 4dcf107b b2f60bb9
......@@ -13,6 +13,7 @@ v 8.9.0 (unreleased)
- Fix endless redirections when accessing user OAuth applications when they are disabled
- Allow enabling wiki page events from Webhook management UI
- Bump rouge to 1.11.0
- Fix MR-auto-close text added to description
- Fix issue with arrow keys not working in search autocomplete dropdown
- Fix an issue where note polling stopped working if a window was in the
background during a refresh.
......
......@@ -83,7 +83,7 @@ module MergeRequests
closes_issue = "Closes ##{iid}"
if merge_request.description.present?
merge_request.description << closes_issue.prepend("\n")
merge_request.description += closes_issue.prepend("\n")
else
merge_request.description = closes_issue
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment