summaryrefslogtreecommitdiff
path: root/app/serializers/build_entity.rb
blob: 38169ab986442da250cd0b3c3c597515d05a4688 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
class BuildEntity < Grape::Entity
  include RequestAwareEntity

  expose :id
  expose :name

  expose :build_url do |build|
    @urls.namespace_project_build_url(
      build.project.namespace,
      build.project,
      build)
  end

  expose :retry_url do |build|
    @urls.retry_namespace_project_build_url(
      build.project.namespace,
      build.project,
      build)
  end
end