Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-03-09 15:08:52 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-03-09 15:08:52 +0300
commitb90d8b54a4d623e52cf1d4318023e3b18d13dd5b (patch)
tree19012dcd9dff32ef1c47182229bdabb6b078a7fc /app/models/commit_status.rb
parenta989894b49e6c72648485a82c570647c17a3763f (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/commit_status.rb')
-rw-r--r--app/models/commit_status.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/app/models/commit_status.rb b/app/models/commit_status.rb
index 781b3456c87..524429bf12a 100644
--- a/app/models/commit_status.rb
+++ b/app/models/commit_status.rb
@@ -84,6 +84,8 @@ class CommitStatus < ApplicationRecord
# extend this `Hash` with new values.
enum_with_nil failure_reason: Enums::Ci::CommitStatus.failure_reasons
+ default_value_for :retried, false
+
##
# We still create some CommitStatuses outside of CreatePipelineService.
#
@@ -290,6 +292,14 @@ class CommitStatus < ApplicationRecord
failed? && !unrecoverable_failure?
end
+ def update_older_statuses_retried!
+ self.class
+ .latest
+ .where(name: name)
+ .where.not(id: id)
+ .update_all(retried: true, processed: true)
+ end
+
private
def unrecoverable_failure?