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

diff_file_metadata_entity.rb « serializers « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 05280518f3912357844e673a8befe972be8550ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
# frozen_string_literal: true

class DiffFileMetadataEntity < Grape::Entity
  expose :added_lines
  expose :removed_lines
  expose :new_path
  expose :old_path
  expose :new_file?, as: :new_file
  expose :deleted_file?, as: :deleted_file
  expose :file_hash do |diff_file|
    Digest::SHA1.hexdigest(diff_file.file_path)
  end
end