2020-01-31 13:09:11 -05:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module API
|
|
|
|
module Entities
|
|
|
|
class Commit < Grape::Entity
|
|
|
|
expose :id, :short_id, :created_at
|
|
|
|
expose :parent_ids
|
|
|
|
expose :full_title, as: :title
|
|
|
|
expose :safe_message, as: :message
|
|
|
|
expose :author_name, :author_email, :authored_date
|
|
|
|
expose :committer_name, :committer_email, :committed_date
|
2021-06-07 05:10:26 -04:00
|
|
|
expose :trailers
|
2020-03-03 13:08:16 -05:00
|
|
|
|
|
|
|
expose :web_url do |commit, _options|
|
|
|
|
Gitlab::UrlBuilder.build(commit)
|
|
|
|
end
|
2020-01-31 13:09:11 -05:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|