diff options
author | Valery Sizov <valery@gitlab.com> | 2015-01-07 12:00:04 -0800 |
---|---|---|
committer | Valery Sizov <valery@gitlab.com> | 2015-01-07 13:27:02 -0800 |
commit | 9d898f8b0508f43dfffb694d5f480a09bf400a0f (patch) | |
tree | 666345dd39ef5a6116776d8edea9b99291e54435 /app/models/commit.rb | |
parent | 01333d40882bfb1d05ba5d0cca2ded0c461aac9a (diff) | |
download | gitlab-ci-9d898f8b0508f43dfffb694d5f480a09bf400a0f.tar.gz |
Fix scheduled retrying
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 f698e39..0e10033 100644 --- a/app/models/commit.rb +++ b/app/models/commit.rb @@ -34,6 +34,12 @@ class Commit < ActiveRecord::Base builds.last end + def retry + builds_without_retry.each do |build| + Build.retry(build) + end + end + def valid_commit_sha if self.sha == Git::BLANK_SHA self.errors.add(:sha, " cant be 00000000 (branch removal)") |