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
Tatuya Kamada
gitlab-ce
Commits
ce78813c
Commit
ce78813c
authored
Feb 18, 2016
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Create or mark task pending as soon the action happens
parent
a57bf9bd
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
4 additions
and
4 deletions
+4
-4
app/controllers/projects/merge_requests_controller.rb
app/controllers/projects/merge_requests_controller.rb
+2
-0
app/services/merge_requests/post_merge_service.rb
app/services/merge_requests/post_merge_service.rb
+0
-1
app/services/notes/create_service.rb
app/services/notes/create_service.rb
+1
-0
app/services/notes/post_process_service.rb
app/services/notes/post_process_service.rb
+0
-2
spec/services/notes/post_process_service_spec.rb
spec/services/notes/post_process_service_spec.rb
+1
-1
No files found.
app/controllers/projects/merge_requests_controller.rb
View file @
ce78813c
...
...
@@ -181,6 +181,8 @@ class Projects::MergeRequestsController < Projects::ApplicationController
return
end
TaskService
.
new
.
merge_merge_request
(
merge_request
,
current_user
)
@merge_request
.
update
(
merge_error:
nil
)
if
params
[
:merge_when_build_succeeds
].
present?
&&
@merge_request
.
ci_commit
&&
@merge_request
.
ci_commit
.
active?
...
...
app/services/merge_requests/post_merge_service.rb
View file @
ce78813c
...
...
@@ -11,7 +11,6 @@ module MergeRequests
create_merge_event
(
merge_request
,
current_user
)
create_note
(
merge_request
)
notification_service
.
merge_mr
(
merge_request
,
current_user
)
task_service
.
merge_merge_request
(
merge_request
,
current_user
)
execute_hooks
(
merge_request
,
'merge'
)
end
...
...
app/services/notes/create_service.rb
View file @
ce78813c
...
...
@@ -8,6 +8,7 @@ module Notes
if
note
.
save
# Finish the harder work in the background
NewNoteWorker
.
perform_in
(
2
.
seconds
,
note
.
id
,
params
)
TaskService
.
new
.
new_note
(
note
,
current_user
)
end
note
...
...
app/services/notes/post_process_service.rb
View file @
ce78813c
...
...
@@ -13,8 +13,6 @@ module Notes
@note
.
create_cross_references!
execute_note_hooks
end
TaskService
.
new
.
new_note
(
note
)
end
def
hook_data
...
...
spec/services/notes/post_process_service_spec.rb
View file @
ce78813c
...
...
@@ -20,7 +20,7 @@ describe Notes::PostProcessService, services: true do
it
do
expect
(
project
).
to
receive
(
:execute_hooks
)
expect
(
project
).
to
receive
(
:execute_services
)
expect_any_instance_of
(
TaskService
).
to
receive
(
:new_note
).
with
(
@note
)
Notes
::
PostProcessService
.
new
(
@note
).
execute
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