debian-mirror-gitlab/app/serializers/deployment_entity.rb

29 lines
548 B
Ruby
Raw Normal View History

2018-11-18 11:00:15 +05:30
# frozen_string_literal: true
2017-08-17 22:00:37 +05:30
class DeploymentEntity < Grape::Entity
include RequestAwareEntity
expose :id
expose :iid
expose :sha
expose :ref do
expose :name do |deployment|
deployment.ref
end
expose :ref_path do |deployment|
2017-09-10 17:25:29 +05:30
project_tree_path(deployment.project, id: deployment.ref)
2017-08-17 22:00:37 +05:30
end
end
expose :created_at
expose :tag
expose :last?
expose :user, using: UserEntity
expose :commit, using: CommitEntity
2017-09-10 17:25:29 +05:30
expose :deployable, using: JobEntity
expose :manual_actions, using: JobEntity
2017-08-17 22:00:37 +05:30
end