diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-19 15:44:42 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-19 15:44:42 +0000 |
commit | 4555e1b21c365ed8303ffb7a3325d773c9b8bf31 (patch) | |
tree | 5423a1c7516cffe36384133ade12572cf709398d /app/services/suggestions | |
parent | e570267f2f6b326480d284e0164a6464ba4081bc (diff) | |
download | gitlab-ce-4555e1b21c365ed8303ffb7a3325d773c9b8bf31.tar.gz |
Add latest changes from gitlab-org/gitlab@13-12-stable-eev13.12.0-rc42
Diffstat (limited to 'app/services/suggestions')
-rw-r--r-- | app/services/suggestions/apply_service.rb | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/app/services/suggestions/apply_service.rb b/app/services/suggestions/apply_service.rb index f9783f4271f..6836700a67d 100644 --- a/app/services/suggestions/apply_service.rb +++ b/app/services/suggestions/apply_service.rb @@ -36,12 +36,22 @@ module Suggestions .track_apply_suggestion_action(user: current_user) end + def author + authors = suggestion_set.authors + + return unless authors.one? + + Gitlab::Git::User.from_gitlab(authors.first) + end + def multi_service params = { commit_message: commit_message, branch_name: suggestion_set.branch, start_branch: suggestion_set.branch, - actions: suggestion_set.actions + actions: suggestion_set.actions, + author_name: author&.name, + author_email: author&.email } ::Files::MultiService.new(suggestion_set.project, current_user, params) |