diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-01-26 09:49:05 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-01-26 09:49:05 +0300 |
commit | 9d85ea3acff1c925118718996afc9daa39d679c7 (patch) | |
tree | 9b5a9a9160d2a8fa3b6f7d5485c367706a4357c5 /app | |
parent | 2b02852507466c8cd7dc9a7db7a7e0dd4c7b5183 (diff) |
Organize event order execution when update issue or mr
Diffstat (limited to 'app')
-rw-r--r-- | app/services/issues/close_service.rb | 2 | ||||
-rw-r--r-- | app/services/issues/update_service.rb | 2 | ||||
-rw-r--r-- | app/services/merge_requests/auto_merge_service.rb | 2 | ||||
-rw-r--r-- | app/services/merge_requests/close_service.rb | 2 | ||||
-rw-r--r-- | app/services/merge_requests/merge_service.rb | 2 | ||||
-rw-r--r-- | app/services/merge_requests/reopen_service.rb | 2 | ||||
-rw-r--r-- | app/services/merge_requests/update_service.rb | 2 |
7 files changed, 7 insertions, 7 deletions
diff --git a/app/services/issues/close_service.rb b/app/services/issues/close_service.rb index ffed13a12e1..f670019cc63 100644 --- a/app/services/issues/close_service.rb +++ b/app/services/issues/close_service.rb @@ -2,9 +2,9 @@ module Issues class CloseService < Issues::BaseService def execute(issue, commit = nil) if issue.close - notification_service.close_issue(issue, current_user) event_service.close_issue(issue, current_user) create_note(issue, commit) + notification_service.close_issue(issue, current_user) execute_hooks(issue, 'close') end diff --git a/app/services/issues/update_service.rb b/app/services/issues/update_service.rb index 0ee9635ed99..83e413d7248 100644 --- a/app/services/issues/update_service.rb +++ b/app/services/issues/update_service.rb @@ -23,8 +23,8 @@ module Issues end if issue.previous_changes.include?('assignee_id') - notification_service.reassigned_issue(issue, current_user) create_assignee_note(issue) + notification_service.reassigned_issue(issue, current_user) end issue.notice_added_references(issue.project, current_user) diff --git a/app/services/merge_requests/auto_merge_service.rb b/app/services/merge_requests/auto_merge_service.rb index b5d90a74e15..378b39bb9d6 100644 --- a/app/services/merge_requests/auto_merge_service.rb +++ b/app/services/merge_requests/auto_merge_service.rb @@ -11,9 +11,9 @@ module MergeRequests if Gitlab::Satellite::MergeAction.new(current_user, merge_request).merge!(commit_message) merge_request.merge - notification_service.merge_mr(merge_request, current_user) create_merge_event(merge_request, current_user) create_note(merge_request) + notification_service.merge_mr(merge_request, current_user) execute_hooks(merge_request) true diff --git a/app/services/merge_requests/close_service.rb b/app/services/merge_requests/close_service.rb index 4249a84f382..47454f9f0c2 100644 --- a/app/services/merge_requests/close_service.rb +++ b/app/services/merge_requests/close_service.rb @@ -7,8 +7,8 @@ module MergeRequests if merge_request.close event_service.close_mr(merge_request, current_user) - notification_service.close_mr(merge_request, current_user) create_note(merge_request) + notification_service.close_mr(merge_request, current_user) execute_hooks(merge_request, 'close') end diff --git a/app/services/merge_requests/merge_service.rb b/app/services/merge_requests/merge_service.rb index 1e1614028f7..327ead4ff3f 100644 --- a/app/services/merge_requests/merge_service.rb +++ b/app/services/merge_requests/merge_service.rb @@ -9,9 +9,9 @@ module MergeRequests def execute(merge_request, commit_message) merge_request.merge - notification_service.merge_mr(merge_request, current_user) create_merge_event(merge_request, current_user) create_note(merge_request) + notification_service.merge_mr(merge_request, current_user) execute_hooks(merge_request, 'merge') true diff --git a/app/services/merge_requests/reopen_service.rb b/app/services/merge_requests/reopen_service.rb index a2a9c933f63..8279ad2001b 100644 --- a/app/services/merge_requests/reopen_service.rb +++ b/app/services/merge_requests/reopen_service.rb @@ -3,8 +3,8 @@ module MergeRequests def execute(merge_request) if merge_request.reopen event_service.reopen_mr(merge_request, current_user) - notification_service.reopen_mr(merge_request, current_user) create_note(merge_request) + notification_service.reopen_mr(merge_request, current_user) execute_hooks(merge_request, 'reopen') merge_request.reload_code merge_request.mark_as_unchecked diff --git a/app/services/merge_requests/update_service.rb b/app/services/merge_requests/update_service.rb index 56c8510e0ae..10c401756eb 100644 --- a/app/services/merge_requests/update_service.rb +++ b/app/services/merge_requests/update_service.rb @@ -33,8 +33,8 @@ module MergeRequests end if merge_request.previous_changes.include?('assignee_id') - notification_service.reassigned_merge_request(merge_request, current_user) create_assignee_note(merge_request) + notification_service.reassigned_merge_request(merge_request, current_user) end merge_request.notice_added_references(merge_request.project, current_user) |