summaryrefslogtreecommitdiff
path: root/app/services/system_notes
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-01-22 21:08:48 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-01-22 21:08:48 +0000
commitb6ec12ceca58b12d974d46d0579742f4d3cdb9d7 (patch)
treec440d6195c651bac465cd37bc0d88fbd3ebefccc /app/services/system_notes
parent3832718d895bf8268f3e3aac85948e2792769345 (diff)
downloadgitlab-ce-b6ec12ceca58b12d974d46d0579742f4d3cdb9d7.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/services/system_notes')
-rw-r--r--app/services/system_notes/merge_requests_service.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/app/services/system_notes/merge_requests_service.rb b/app/services/system_notes/merge_requests_service.rb
index 1d17f0ded57..a26fc0f7d35 100644
--- a/app/services/system_notes/merge_requests_service.rb
+++ b/app/services/system_notes/merge_requests_service.rb
@@ -139,6 +139,17 @@ module SystemNotes
create_note(NoteSummary.new(noteable, project, author, body, action: 'merge'))
end
+
+ def picked_into_branch(branch_name, pick_commit)
+ link = url_helpers.project_tree_path(project, branch_name)
+
+ body = "picked this merge request into branch [`#{branch_name}`](#{link}) with commit #{pick_commit}"
+
+ summary = NoteSummary.new(noteable, project, author, body, action: 'cherry_pick')
+ summary.note[:commit_id] = pick_commit
+
+ create_note(summary)
+ end
end
end