diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-06-12 21:09:34 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-06-12 21:09:34 +0300 |
commit | 949ed51c6d20ba24e1f508cae9a65b86114bff62 (patch) | |
tree | 9308fe87e6d61b35eb3b2d101c47e89b9054655f /app/services/merge_requests | |
parent | c0b17cee8be646588b14db49ad6d91b8cc818f97 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/services/merge_requests')
-rw-r--r-- | app/services/merge_requests/create_service.rb | 1 | ||||
-rw-r--r-- | app/services/merge_requests/update_service.rb | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/app/services/merge_requests/create_service.rb b/app/services/merge_requests/create_service.rb index 39e1594d215..a042e570132 100644 --- a/app/services/merge_requests/create_service.rb +++ b/app/services/merge_requests/create_service.rb @@ -41,6 +41,7 @@ module MergeRequests # timeout, we do this before we attempt to save the merge request. merge_request.skip_ensure_merge_request_diff = true + Spam::SpamActionService.new(spammable: merge_request, user: current_user, action: :create).execute end def set_projects! diff --git a/app/services/merge_requests/update_service.rb b/app/services/merge_requests/update_service.rb index aaed01403cb..123420d9af3 100644 --- a/app/services/merge_requests/update_service.rb +++ b/app/services/merge_requests/update_service.rb @@ -209,6 +209,11 @@ module MergeRequests old_branch, new_branch) end + override :before_update + def before_update(merge_request, skip_spam_check: false) + Spam::SpamActionService.new(spammable: merge_request, user: current_user, action: :update).execute unless skip_spam_check + end + override :handle_quick_actions def handle_quick_actions(merge_request) super |