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 /app/models/commit.rb | |
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 'app/models/commit.rb')
-rw-r--r-- | app/models/commit.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/models/commit.rb b/app/models/commit.rb index 665f136..bad8896 100644 --- a/app/models/commit.rb +++ b/app/models/commit.rb @@ -94,4 +94,10 @@ class Commit < ActiveRecord::Base recipients << git_author_email if project.email_add_committer? recipients.uniq end + + def create_builds + project.jobs.active.map do |job| + builds.create(commands: job.commands) + end + end end |