summaryrefslogtreecommitdiff
path: root/app/services/system_note_service.rb
diff options
context:
space:
mode:
authorSean McGivern <sean@gitlab.com>2017-05-05 22:00:36 +0100
committerSean McGivern <sean@gitlab.com>2017-05-05 22:00:36 +0100
commit86e75ae09238c7f73347c0e310c47f6070c005b9 (patch)
treee2ce5edb596eb8b35cf530669f34bf1cb034b05a /app/services/system_note_service.rb
parentc1d5af67d3743b12718939c9d60c38035d388176 (diff)
parent8c4c40d09b6947f4ac652dd76cc422fea2a6443d (diff)
downloadgitlab-ce-86e75ae09238c7f73347c0e310c47f6070c005b9.tar.gz
Merge branch 'blackst0ne/gitlab-ce-add_system_note_for_editing_issuable'
Diffstat (limited to 'app/services/system_note_service.rb')
-rw-r--r--app/services/system_note_service.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/app/services/system_note_service.rb b/app/services/system_note_service.rb
index fb1f56c9cc6..174e7c6e95b 100644
--- a/app/services/system_note_service.rb
+++ b/app/services/system_note_service.rb
@@ -299,6 +299,23 @@ module SystemNoteService
create_note(NoteSummary.new(noteable, project, author, body, action: 'title'))
end
+ # Called when the description of a Noteable is changed
+ #
+ # noteable - Noteable object that responds to `description`
+ # project - Project owning noteable
+ # author - User performing the change
+ #
+ # Example Note text:
+ #
+ # "changed the description"
+ #
+ # Returns the created Note object
+ def change_description(noteable, project, author)
+ body = 'changed the description'
+
+ create_note(NoteSummary.new(noteable, project, author, body, action: 'description'))
+ end
+
# Called when the confidentiality changes
#
# issue - Issue object