summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-10-08 20:42:09 +0200
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-10-08 20:42:09 +0200
commit904de2d64b1b63a82cfba92e02b6c25ff94b725b (patch)
treef3805b4e6ed0918fe30d08ee81130f7ed13ee4e8
parent3fb4d86c6dbb2298f6d5b0010ae0f6e26905b934 (diff)
downloadgitlab-ce-904de2d64b1b63a82cfba92e02b6c25ff94b725b.tar.gz
Check for transition loopback in commit statusfix/async-pipeline-processing-stale-data
-rw-r--r--app/models/commit_status.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/models/commit_status.rb b/app/models/commit_status.rb
index c8b168f5526..5d6d534cd31 100644
--- a/app/models/commit_status.rb
+++ b/app/models/commit_status.rb
@@ -85,7 +85,9 @@ class CommitStatus < ActiveRecord::Base
commit_status.update_attributes finished_at: Time.now
end
- after_transition do |commit_status|
+ after_transition do |commit_status, transition|
+ return if transition.loopback?
+
commit_status.run_after_commit do
pipeline.try do |pipeline|
if complete?