summaryrefslogtreecommitdiff
path: root/app/services/system_note_service.rb
diff options
context:
space:
mode:
authorZeger-Jan van de Weg <mail@zjvandeweg.nl>2016-02-17 07:11:48 +0100
committerZeger-Jan van de Weg <zegerjan@gitlab.com>2016-03-15 20:21:11 +0100
commitad97bebfed2e65951c7dc39ee80b32089a032804 (patch)
tree772303e5eb9d82f1d6789a8a77f0537b8ef68df8 /app/services/system_note_service.rb
parent228007dfbcd8f97c66c1802f3b69abd7d02c7d26 (diff)
downloadgitlab-ce-ad97bebfed2e65951c7dc39ee80b32089a032804.tar.gz
Enhance new branch button on an issue
Diffstat (limited to 'app/services/system_note_service.rb')
-rw-r--r--app/services/system_note_service.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/app/services/system_note_service.rb b/app/services/system_note_service.rb
index 58a861ee08e..751815c5b18 100644
--- a/app/services/system_note_service.rb
+++ b/app/services/system_note_service.rb
@@ -207,6 +207,15 @@ class SystemNoteService
create_note(noteable: noteable, project: project, author: author, note: body)
end
+ # Called when a branch is created from the 'new branch' button on a issue
+ # Example note text:
+ #
+ # "Started branch `201-issue-branch-button`"
+ def self.new_issue_branch(issue, project, author, branch)
+ body = "Started branch `#{branch}`"
+ create_note(noteable: issue, project: project, author: author, note: body)
+ end
+
# Called when a Mentionable references a Noteable
#
# noteable - Noteable object being referenced