2020-01-30 10:09:15 -05:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module API
|
|
|
|
module Entities
|
|
|
|
class RemoteMirror < Grape::Entity
|
|
|
|
expose :id
|
|
|
|
expose :enabled
|
|
|
|
expose :safe_url, as: :url
|
|
|
|
expose :update_status
|
|
|
|
expose :last_update_at
|
|
|
|
expose :last_update_started_at
|
|
|
|
expose :last_successful_update_at
|
|
|
|
expose :last_error
|
|
|
|
expose :only_protected_branches
|
2020-03-09 08:07:45 -04:00
|
|
|
expose :keep_divergent_refs, if: -> (mirror, _options) do
|
|
|
|
::Feature.enabled?(:keep_divergent_refs, mirror.project)
|
|
|
|
end
|
2020-01-30 10:09:15 -05:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|