diff options
author | Rémy Coutable <remy@rymai.me> | 2017-03-29 11:36:26 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-03-29 11:36:26 +0000 |
commit | b0e18eaf87e446caa075ba56c0e805b514206e10 (patch) | |
tree | 5f475e6cbf6eb5a6b5681618f61b99cc58c74fa9 /app/models | |
parent | b20ba3614360a7241072de78f5d75569a08aa270 (diff) | |
parent | bb910c3b46fa9dde47ea3377d4463c0eae5149c7 (diff) | |
download | gitlab-ce-b0e18eaf87e446caa075ba56c0e805b514206e10.tar.gz |
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/models')
-rw-r--r-- | app/models/commit_status.rb | 4 |
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 |