2016-08-22 19:10:29 +00:00
|
|
|
module Bitbucket
|
|
|
|
module Representation
|
|
|
|
class Comment < Representation::Base
|
|
|
|
def author
|
2016-12-13 19:28:04 +00:00
|
|
|
user_representation(user)
|
2016-08-22 19:10:29 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def note
|
|
|
|
raw.dig('content', 'raw')
|
|
|
|
end
|
|
|
|
|
|
|
|
def created_at
|
|
|
|
raw['created_on']
|
|
|
|
end
|
|
|
|
|
|
|
|
def updated_at
|
|
|
|
raw['updated_on'] || raw['created_on']
|
|
|
|
end
|
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
def user
|
|
|
|
raw.fetch('user', {})
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|