diff options
author | blackst0ne <blackst0ne.ru@gmail.com> | 2017-04-29 10:54:37 +1100 |
---|---|---|
committer | blackst0ne <blackst0ne.ru@gmail.com> | 2017-05-04 12:58:41 +1100 |
commit | 323596f68efe95b479a0dc29832b8033a1eddef0 (patch) | |
tree | cbf2190f46a6df26f694ae67ce1c2b0f826a71c8 /app/services/system_note_service.rb | |
parent | 4faa65d8381f3e1e45bdf3a9bc9785b588891b66 (diff) | |
download | gitlab-ce-323596f68efe95b479a0dc29832b8033a1eddef0.tar.gz |
Add system note on description change of issue/merge request
Diffstat (limited to 'app/services/system_note_service.rb')
-rw-r--r-- | app/services/system_note_service.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/app/services/system_note_service.rb b/app/services/system_note_service.rb index c9e25c7aaa2..82694305a92 100644 --- a/app/services/system_note_service.rb +++ b/app/services/system_note_service.rb @@ -261,6 +261,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 |