diff options
Diffstat (limited to 'app/models/ci/commit.rb')
-rw-r--r-- | app/models/ci/commit.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/app/models/ci/commit.rb b/app/models/ci/commit.rb index 31638c7e1dc..9a719787649 100644 --- a/app/models/ci/commit.rb +++ b/app/models/ci/commit.rb @@ -32,14 +32,15 @@ module Ci sha[0...8] end - def project - @project ||= gl_project.gitlab_ci_project - end - def to_param sha end + def project + @project ||= gl_project.gitlab_ci_project + @project ||= gl_project.create_gitlab_ci_project + end + def last_build builds.order(:id).last end @@ -115,7 +116,6 @@ module Ci builds_attrs = config_processor.builds_for_stage_and_ref(stage, ref, tag) builds_attrs.map do |build_attrs| builds.create!({ - project: project, name: build_attrs[:name], commands: build_attrs[:script], tag_list: build_attrs[:tags], |