Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamil Trzciński <ayufan@ayufan.eu>2019-07-05 16:16:57 +0300
committerKamil Trzciński <ayufan@ayufan.eu>2019-07-05 16:16:57 +0300
commit882e798caf5ac29c8f995922ce942cbe7822fc53 (patch)
treeb1d2cb24113b5a3c269dcfd4b6a2dbd3ba749b1f /app/services/system_note_service.rb
parenta816bad9a4b37b79c5ba5426bf277a8651099c3f (diff)
parent587ffd11480db3ed492459ec2b6fac32a459ebaa (diff)
Merge branch 'make-explicit-endpoint-abort-in-auto-merge-ce' into 'master'
CE Port: Split AutoMergeService interfaces into two `cancel` and `abort` See merge request gitlab-org/gitlab-ce!30249
Diffstat (limited to 'app/services/system_note_service.rb')
-rw-r--r--app/services/system_note_service.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/app/services/system_note_service.rb b/app/services/system_note_service.rb
index 1d02d7ed787..e4564bc9b00 100644
--- a/app/services/system_note_service.rb
+++ b/app/services/system_note_service.rb
@@ -234,6 +234,16 @@ module SystemNoteService
create_note(NoteSummary.new(noteable, project, author, body, action: 'merge'))
end
+ # Called when 'merge when pipeline succeeds' is aborted
+ def abort_merge_when_pipeline_succeeds(noteable, project, author, reason)
+ body = "aborted the automatic merge because #{reason}"
+
+ ##
+ # TODO: Abort message should be sent by the system, not a particular user.
+ # See https://gitlab.com/gitlab-org/gitlab-ce/issues/63187.
+ create_note(NoteSummary.new(noteable, project, author, body, action: 'merge'))
+ end
+
def handle_merge_request_wip(noteable, project, author)
prefix = noteable.work_in_progress? ? "marked" : "unmarked"