diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-11-03 18:25:55 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-11-03 18:25:55 +0200 |
commit | ada547589c8a66b936c8d197abee15994f7a1665 (patch) | |
tree | 57c1535a9793b413dfe633c4dedccb315455b490 /lib/api | |
parent | 407b36882747d9a48e7d4312baf474b6c700d0be (diff) | |
download | gitlab-ci-ada547589c8a66b936c8d197abee15994f7a1665.tar.gz |
Commit creates multiple builds now
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'lib/api')
-rw-r--r-- | lib/api/builds.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/api/builds.rb b/lib/api/builds.rb index f96c1d4..5d2c352 100644 --- a/lib/api/builds.rb +++ b/lib/api/builds.rb @@ -83,7 +83,10 @@ module API required_attributes! [:project_id, :data, :project_token] project = Project.find(params[:project_id]) authenticate_project_token!(project) - build = CreateBuildService.new.execute(project, params[:data]) + builds = CreateBuildsService.new.execute(project, params[:data]) + + # to keep api compatibility for now + build = builds.first if build.persisted? present build, with: Entities::Build |