2019-11-06 04:06:23 -05:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Gitlab
|
|
|
|
module SlashCommands
|
|
|
|
module Presenters
|
|
|
|
module NoteBase
|
|
|
|
GREEN = '#38ae67'
|
|
|
|
|
2019-11-29 10:06:43 -05:00
|
|
|
def color(_)
|
2019-11-06 04:06:23 -05:00
|
|
|
GREEN
|
|
|
|
end
|
|
|
|
|
|
|
|
def issue
|
|
|
|
resource.noteable
|
|
|
|
end
|
|
|
|
|
|
|
|
def project
|
|
|
|
issue.project
|
|
|
|
end
|
|
|
|
|
|
|
|
def author
|
|
|
|
resource.author
|
|
|
|
end
|
|
|
|
|
|
|
|
def fields
|
|
|
|
[
|
|
|
|
{
|
|
|
|
title: 'Comment',
|
|
|
|
value: resource.note
|
|
|
|
}
|
|
|
|
]
|
|
|
|
end
|
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
attr_reader :resource
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|