2020-02-09 13:09:01 -05:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module API
|
|
|
|
module Entities
|
|
|
|
class CommitNote < Grape::Entity
|
|
|
|
expose :note
|
|
|
|
expose(:path) { |note| note.diff_file.try(:file_path) if note.diff_note? }
|
2021-08-25 05:10:52 -04:00
|
|
|
expose(:line) { |note| note.diff_line.try(:line) if note.diff_note? }
|
2020-02-09 13:09:01 -05:00
|
|
|
expose(:line_type) { |note| note.diff_line.try(:type) if note.diff_note? }
|
|
|
|
expose :author, using: Entities::UserBasic
|
|
|
|
expose :created_at
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|