diff options
author | Guilherme Salazar <gmesalazar@gmail.com> | 2016-09-23 20:43:57 -0300 |
---|---|---|
committer | Guilherme Salazar <gmesalazar@gmail.com> | 2016-09-28 23:58:16 -0300 |
commit | e80e4cb8b97a3865b7e3c551a856a53d98cccf75 (patch) | |
tree | b7a68729c8920bde4be68b7fe30cfbe7e623101b /lib | |
parent | f4ded8a80889749d057b077a8e3f3ad45d8ba7b0 (diff) | |
download | gitlab-ce-e80e4cb8b97a3865b7e3c551a856a53d98cccf75.tar.gz |
expose pipeline data in builds API
add pipeline ref, sha, and status to the build API response
add tests of build API (pipeline data)
change API documentation for builds API
log change to builds API in CHANGELOG
CHANGELOG: add reference to pull request and contributor's name
Diffstat (limited to 'lib')
-rw-r--r-- | lib/api/entities.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb index 0adc118ba27..409a4c7cc07 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -545,6 +545,10 @@ module API expose :filename, :size end + class PipelineBasic < Grape::Entity + expose :id, :sha, :ref, :status + end + class Build < Grape::Entity expose :id, :status, :stage, :name, :ref, :tag, :coverage expose :created_at, :started_at, :finished_at @@ -552,6 +556,7 @@ module API expose :artifacts_file, using: BuildArtifactFile, if: -> (build, opts) { build.artifacts? } expose :commit, with: RepoCommit expose :runner, with: Runner + expose :pipeline, with: PipelineBasic end class Trigger < Grape::Entity @@ -562,8 +567,8 @@ module API expose :key, :value end - class Pipeline < Grape::Entity - expose :id, :status, :ref, :sha, :before_sha, :tag, :yaml_errors + class Pipeline < PipelineBasic + expose :before_sha, :tag, :yaml_errors expose :user, with: Entities::UserBasic expose :created_at, :updated_at, :started_at, :finished_at, :committed_at |