Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
09209725
Commit
09209725
authored
Apr 28, 2016
by
Sean McGivern
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't auto-set MR title for confidential issues
parent
e76f339d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
2 deletions
+11
-2
app/services/merge_requests/build_service.rb
app/services/merge_requests/build_service.rb
+1
-1
spec/services/merge_requests/build_service_spec.rb
spec/services/merge_requests/build_service_spec.rb
+10
-1
No files found.
app/services/merge_requests/build_service.rb
View file @
09209725
...
...
@@ -68,7 +68,7 @@ module MergeRequests
commit
=
commits
.
first
merge_request
.
title
=
commit
.
title
merge_request
.
description
||=
commit
.
description
.
try
(
:strip
)
elsif
iid
&&
(
issue
=
merge_request
.
target_project
.
get_issue
(
iid
))
elsif
iid
&&
(
issue
=
merge_request
.
target_project
.
get_issue
(
iid
))
&&
!
issue
.
try
(
:confidential?
)
case
issue
when
Issue
merge_request
.
title
=
"Resolve
\"
#{
issue
.
title
}
\"
"
...
...
spec/services/merge_requests/build_service_spec.rb
View file @
09209725
...
...
@@ -5,7 +5,8 @@ describe MergeRequests::BuildService, services: true do
let
(
:project
)
{
create
(
:project
)
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:issue
)
{
create
(
:issue
,
project:
project
,
title:
'A bug'
)
}
let
(
:issue_confidential
)
{
false
}
let
(
:issue
)
{
create
(
:issue
,
project:
project
,
title:
'A bug'
,
confidential:
issue_confidential
)
}
let
(
:description
)
{
nil
}
let
(
:source_branch
)
{
'feature-branch'
}
let
(
:target_branch
)
{
'master'
}
...
...
@@ -156,6 +157,14 @@ describe MergeRequests::BuildService, services: true do
expect
(
merge_request
.
title
).
to
eq
(
"
#{
issue
.
iid
.
succ
}
fix issue"
)
end
end
context
'issue is confidential'
do
let
(
:issue_confidential
)
{
true
}
it
'uses the title of the branch as the merge request title'
do
expect
(
merge_request
.
title
).
to
eq
(
"
#{
issue
.
iid
}
fix issue"
)
end
end
end
context
'branch starts with external issue IID followed by a hyphen'
do
...
...
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