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
path: root/app
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2017-03-29 14:36:26 +0300
committerJames Lopez <james@jameslopez.es>2017-04-03 13:11:57 +0300
commit54842848ec3bd520874c7d88ffc7d30e43e312d4 (patch)
tree8df0ec30095ce6032d51f2de889a421a85f249b1 /app
parent3e59fd2d9746e1ec666e1ea1228b47bba1c40f24 (diff)
Merge branch 'optimistic-locking-ci-status-change' into 'master'
Make CI build to use optimistic locking only on status change Closes #29679 See merge request !10152
Diffstat (limited to 'app')
-rw-r--r--app/models/commit_status.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/commit_status.rb b/app/models/commit_status.rb
index 8c71267da65..17b322b5ae3 100644
--- a/app/models/commit_status.rb
+++ b/app/models/commit_status.rb
@@ -105,6 +105,10 @@ class CommitStatus < ActiveRecord::Base
end
end
+ def locking_enabled?
+ status_changed?
+ end
+
def before_sha
pipeline.before_sha || Gitlab::Git::BLANK_SHA
end