提交 b1ab1609 编写于 作者: M Mark Chao

Avoid race condition of re-triggering mark_as_unchecked

上级 a660f548
......@@ -104,8 +104,8 @@ class MergeRequest < ActiveRecord::Base
state_machine :merge_status, initial: :unchecked do
event :mark_as_unchecked do
transition [:can_be_merged] => :unchecked
transition [:cannot_be_merged] => :cannot_be_merged_recheck
transition [:can_be_merged, :unchecked] => :unchecked
transition [:cannot_be_merged, :cannot_be_merged_recheck] => :cannot_be_merged_recheck
end
event :mark_as_mergeable do
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册