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:
authorDouwe Maan <douwe@selenight.nl>2016-02-27 06:34:14 +0300
committerDouwe Maan <douwe@selenight.nl>2016-02-27 06:34:14 +0300
commitacf9778e77e5d6e36cb3eb750e88adaa5881a94a (patch)
treeb50ec601a245819389d7c8977de7e6f843789ff7 /app/services/system_note_service.rb
parent01160fc06182de89c400af174861f6545ad6ceb8 (diff)
Use specialized system notes when MR is (un)marked as WIP
Diffstat (limited to 'app/services/system_note_service.rb')
-rw-r--r--app/services/system_note_service.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/app/services/system_note_service.rb b/app/services/system_note_service.rb
index edced010811..e579ca76565 100644
--- a/app/services/system_note_service.rb
+++ b/app/services/system_note_service.rb
@@ -144,6 +144,18 @@ class SystemNoteService
create_note(noteable: noteable, project: project, author: author, note: body)
end
+ def self.remove_merge_request_wip(noteable, project, author)
+ body = 'Unmarked this merge request as Work In Progress'
+
+ create_note(noteable: noteable, project: project, author: author, note: body)
+ end
+
+ def self.add_merge_request_wip(noteable, project, author)
+ body = 'Marked this merge request as **Work In Progress**'
+
+ create_note(noteable: noteable, project: project, author: author, note: body)
+ end
+
# Called when the title of a Noteable is changed
#
# noteable - Noteable object that responds to `title`