diff options
author | Tomasz Maczukin <tomasz@maczukin.pl> | 2017-11-21 12:37:18 +0100 |
---|---|---|
committer | Tomasz Maczukin <tomasz@maczukin.pl> | 2017-11-28 00:36:49 +0100 |
commit | 7b643c02c20e7552a35c09adf8d8dca1e8c3a4a3 (patch) | |
tree | 0e0306598dca71bfaaf84257cb92bc68f9d97052 /lib/api/entities.rb | |
parent | b7ed102ea601fb4c6f65c5a982058f8c92883d31 (diff) | |
download | gitlab-ce-7b643c02c20e7552a35c09adf8d8dca1e8c3a4a3.tar.gz |
Modify output
Diffstat (limited to 'lib/api/entities.rb')
-rw-r--r-- | lib/api/entities.rb | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb index cea9e9a8028..ce332fe85d2 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -832,18 +832,21 @@ module API expose :id, :sha, :ref, :status end - class Job < Grape::Entity + class JobBasic < Grape::Entity expose :id, :status, :stage, :name, :ref, :tag, :coverage expose :created_at, :started_at, :finished_at expose :duration expose :user, with: User - expose :artifacts_file, using: JobArtifactFile, if: -> (job, opts) { job.artifacts? } expose :commit, with: Commit - expose :runner, with: Runner expose :pipeline, with: PipelineBasic end - class JobWithProject < Job + class Job < JobBasic + expose :artifacts_file, using: JobArtifactFile, if: -> (job, opts) { job.artifacts? } + expose :runner, with: Runner + end + + class JobBasicWithProject < JobBasic expose :project, with: ProjectIdentity end |