diff options
author | Heinrich Lee Yu <heinrich@gitlab.com> | 2019-08-22 14:14:51 +0800 |
---|---|---|
committer | Heinrich Lee Yu <heinrich@gitlab.com> | 2019-08-22 14:14:51 +0800 |
commit | 0e274dfca07ced0458db69b4dfc86a57c39620e5 (patch) | |
tree | d19099c778d8d3af41c53fa64ee0c5ed265c12dd | |
parent | 1d5f5aa896a38104c375ac6ddd168d03d408f05e (diff) | |
download | gitlab-ce-0e274dfca07ced0458db69b4dfc86a57c39620e5.tar.gz |
Remove unneeded check for merge_request.project66368-remove-unnecessary-check-in-mr-hook
-rw-r--r-- | app/services/merge_requests/base_service.rb | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/app/services/merge_requests/base_service.rb b/app/services/merge_requests/base_service.rb index 067510a8a0a..c6aae4c28f2 100644 --- a/app/services/merge_requests/base_service.rb +++ b/app/services/merge_requests/base_service.rb @@ -17,11 +17,9 @@ module MergeRequests end def execute_hooks(merge_request, action = 'open', old_rev: nil, old_associations: {}) - if merge_request.project - merge_data = hook_data(merge_request, action, old_rev: old_rev, old_associations: old_associations) - merge_request.project.execute_hooks(merge_data, :merge_request_hooks) - merge_request.project.execute_services(merge_data, :merge_request_hooks) - end + merge_data = hook_data(merge_request, action, old_rev: old_rev, old_associations: old_associations) + merge_request.project.execute_hooks(merge_data, :merge_request_hooks) + merge_request.project.execute_services(merge_data, :merge_request_hooks) end def cleanup_environments(merge_request) |