diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-11-05 15:13:34 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-11-05 15:13:34 +0200 |
commit | f17c4950fa5a951102d5592dc962f20e302b44aa (patch) | |
tree | 9c6f7078d1db168d8154739d52fc062d5987c3c4 /lib/api | |
parent | 056df41ed16f6eddf3271caad93a118f97e8b58c (diff) | |
download | gitlab-ci-f17c4950fa5a951102d5592dc962f20e302b44aa.tar.gz |
Refactor commits/builds logic
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'lib/api')
-rw-r--r-- | lib/api/builds.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/api/builds.rb b/lib/api/builds.rb index 1103dad..e4d6e4b 100644 --- a/lib/api/builds.rb +++ b/lib/api/builds.rb @@ -89,10 +89,10 @@ module API required_attributes! [:project_id, :data, :project_token] project = Project.find(params[:project_id]) authenticate_project_token!(project) - builds = CreateBuildsService.new.execute(project, params[:data]) + commit = CreateCommitService.new.execute(project, params[:data]) # Temporary solution to keep api compatibility - build = builds.first + build = commit.builds.first if build.persisted? present build, with: Entities::Build |