summaryrefslogtreecommitdiff
path: root/lib/api/v3/entities.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/api/v3/entities.rb')
-rw-r--r--lib/api/v3/entities.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/api/v3/entities.rb b/lib/api/v3/entities.rb
index 3cc0dc968a8..7daa653905a 100644
--- a/lib/api/v3/entities.rb
+++ b/lib/api/v3/entities.rb
@@ -11,6 +11,16 @@ module API
Gitlab::UrlBuilder.build(snippet)
end
end
+
+ class Build < Grape::Entity
+ expose :id, :status, :stage, :name, :ref, :tag, :coverage
+ expose :created_at, :started_at, :finished_at
+ expose :user, with: ::API::Entities::User
+ expose :artifacts_file, using: ::API::Entities::JobArtifactFile, if: -> (build, opts) { build.artifacts? }
+ expose :commit, with: ::API::Entities::RepoCommit
+ expose :runner, with: ::API::Entities::Runner
+ expose :pipeline, with: ::API::Entities::PipelineBasic
+ end
end
end
end