mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-15 07:36:41 +10:00
Merge branch 'merge-status-transition' into 'master'
Update merge_status state to allow more transitions Previously you could only transition from the unchecked state to one of the others. This meant that the mark_as_unmerged call in AutoMergeService would rarily be able to actually transition the state. As it would usually have already been set to can_be_merged before it hit that service. Spec and Spinach tests have been run locally and all pass. See merge request !405
This commit is contained in:
@@ -95,11 +95,11 @@ class MergeRequest < ActiveRecord::Base
|
||||
end
|
||||
|
||||
event :mark_as_mergeable do
|
||||
transition unchecked: :can_be_merged
|
||||
transition [:unchecked, :cannot_be_merged] => :can_be_merged
|
||||
end
|
||||
|
||||
event :mark_as_unmergeable do
|
||||
transition unchecked: :cannot_be_merged
|
||||
transition [:unchecked, :can_be_merged] => :cannot_be_merged
|
||||
end
|
||||
|
||||
state :unchecked
|
||||
|
||||
Reference in New Issue
Block a user