Welcome to mirror list, hosted at ThFree Co, Russian Federation.

commit.rb « entities « api « lib - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: fd23c23b98000fb61286d0b334b0a460c40745cb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# 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
      expose :trailers

      expose :web_url do |commit, _options|
        Gitlab::UrlBuilder.build(commit)
      end
    end
  end
end