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
Jérome Perrin
gitlab-ce
Commits
1fcf3f3d
Commit
1fcf3f3d
authored
Aug 02, 2017
by
Shinya Maeda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
essential
parent
93e96c3f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
app/services/merge_requests/create_service.rb
app/services/merge_requests/create_service.rb
+6
-1
No files found.
app/services/merge_requests/create_service.rb
View file @
1fcf3f3d
...
...
@@ -12,7 +12,6 @@ module MergeRequests
merge_request
.
source_project
=
source_project
merge_request
.
source_branch
=
params
[
:source_branch
]
merge_request
.
merge_params
[
'force_remove_source_branch'
]
=
params
.
delete
(
:force_remove_source_branch
)
merge_request
.
head_pipeline
=
head_pipeline_for
(
merge_request
)
create
(
merge_request
)
end
...
...
@@ -22,10 +21,16 @@ module MergeRequests
notification_service
.
new_merge_request
(
issuable
,
current_user
)
todo_service
.
new_merge_request
(
issuable
,
current_user
)
issuable
.
cache_merge_request_closes_issues!
(
current_user
)
update_merge_requests_head_pipeline
(
issuable
)
end
private
def
update_merge_requests_head_pipeline
(
merge_request
)
pipeline
=
head_pipeline_for
(
merge_request
)
merge_request
.
update
(
head_pipeline_id:
pipeline
.
id
)
if
pipeline
end
def
head_pipeline_for
(
merge_request
)
return
unless
merge_request
.
source_project
...
...
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