diff options
author | Douwe Maan <douwe@selenight.nl> | 2017-06-09 16:24:54 -0500 |
---|---|---|
committer | Fatih Acet <acetfatih@gmail.com> | 2017-07-21 22:35:24 +0300 |
commit | 76c3d2d434d3c550c3de912abc0a5b1dc1455368 (patch) | |
tree | caf45606608993ccd660c8cab45ef387fbf9756e /app/helpers/system_note_helper.rb | |
parent | cb2287df0ad9396d1f075bde1c4f6de481d908e6 (diff) | |
download | gitlab-ce-76c3d2d434d3c550c3de912abc0a5b1dc1455368.tar.gz |
Add full JSON endpoints for issue notes and discussions
Diffstat (limited to 'app/helpers/system_note_helper.rb')
-rw-r--r-- | app/helpers/system_note_helper.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/app/helpers/system_note_helper.rb b/app/helpers/system_note_helper.rb index 209bd56b78a..69366825124 100644 --- a/app/helpers/system_note_helper.rb +++ b/app/helpers/system_note_helper.rb @@ -21,8 +21,14 @@ module SystemNoteHelper 'outdated' => 'icon_edit' }.freeze + def system_note_icon_name(note) + ICON_NAMES_BY_ACTION[note.system_note_metadata&.action] + end + def icon_for_system_note(note) - icon_name = ICON_NAMES_BY_ACTION[note.system_note_metadata&.action] + icon_name = system_note_icon_name(note) custom_icon(icon_name) if icon_name end + + extend self end |