BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
0ee5efbd
Commit
0ee5efbd
authored
Sep 01, 2016
by
Luke Howell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prepend blank line to close message on merge request
- Added an extra new line to the prepend of the Close message Fixes #21710
parent
a4c56a2b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
3 deletions
+4
-3
CHANGELOG
CHANGELOG
+1
-0
build_service.rb
app/services/merge_requests/build_service.rb
+1
-1
build_service_spec.rb
spec/services/merge_requests/build_service_spec.rb
+2
-2
No files found.
CHANGELOG
View file @
0ee5efbd
Please view this file on the master branch, on stable branches it's out of date.
v 8.12.0 (unreleased)
- Prepend blank line to `Closes` message on merge request linked to issue (lukehowell)
- Filter tags by name !6121
- Make push events have equal vertical spacing.
- Add two-factor recovery endpoint to internal API !5510
...
...
app/services/merge_requests/build_service.rb
View file @
0ee5efbd
...
...
@@ -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
\n
"
)
else
merge_request
.
description
=
closes_issue
end
...
...
spec/services/merge_requests/build_service_spec.rb
View file @
0ee5efbd
...
...
@@ -99,14 +99,14 @@ describe MergeRequests::BuildService, services: true do
let
(
:source_branch
)
{
"
#{
issue
.
iid
}
-fix-issue"
}
it
'appends "Closes #$issue-iid" to the description'
do
expect
(
merge_request
.
description
).
to
eq
(
"
#{
commit_1
.
safe_message
.
split
(
/\n+/
,
2
).
last
}
\n
Closes #
#{
issue
.
iid
}
"
)
expect
(
merge_request
.
description
).
to
eq
(
"
#{
commit_1
.
safe_message
.
split
(
/\n+/
,
2
).
last
}
\n
\n
Closes #
#{
issue
.
iid
}
"
)
end
context
'merge request already has a description set'
do
let
(
:description
)
{
'Merge request description'
}
it
'appends "Closes #$issue-iid" to the description'
do
expect
(
merge_request
.
description
).
to
eq
(
"
#{
description
}
\n
Closes #
#{
issue
.
iid
}
"
)
expect
(
merge_request
.
description
).
to
eq
(
"
#{
description
}
\n
\n
Closes #
#{
issue
.
iid
}
"
)
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment