Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
63b538c2
Commit
63b538c2
authored
Apr 21, 2020
by
David Kim
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix merge_requests stuck in cannot_be_merged_rechecking state
parent
3ed77673
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
app/models/merge_request.rb
app/models/merge_request.rb
+2
-2
spec/models/merge_request_spec.rb
spec/models/merge_request_spec.rb
+1
-1
No files found.
app/models/merge_request.rb
View file @
63b538c2
...
...
@@ -163,7 +163,7 @@ class MergeRequest < ApplicationRecord
state_machine
:merge_status
,
initial: :unchecked
do
event
:mark_as_unchecked
do
transition
[
:can_be_merged
,
:checking
,
:unchecked
]
=>
:unchecked
transition
[
:cannot_be_merged
,
:cannot_be_merged_recheck
]
=>
:cannot_be_merged_recheck
transition
[
:cannot_be_merged
,
:cannot_be_merged_recheck
ing
,
:cannot_be_merged_recheck
]
=>
:cannot_be_merged_recheck
end
event
:mark_as_checking
do
...
...
@@ -200,7 +200,7 @@ class MergeRequest < ApplicationRecord
# rubocop: enable CodeReuse/ServiceClass
def
check_state?
(
merge_status
)
[
:unchecked
,
:cannot_be_merged_recheck
,
:checking
].
include?
(
merge_status
.
to_sym
)
[
:unchecked
,
:cannot_be_merged_recheck
,
:checking
,
:cannot_be_merged_rechecking
].
include?
(
merge_status
.
to_sym
)
end
end
...
...
spec/models/merge_request_spec.rb
View file @
63b538c2
...
...
@@ -3352,7 +3352,7 @@ describe MergeRequest do
describe
'check_state?'
do
it
'indicates whether MR is still checking for mergeability'
do
state_machine
=
described_class
.
state_machines
[
:merge_status
]
check_states
=
[
:unchecked
,
:cannot_be_merged_recheck
,
:checking
]
check_states
=
[
:unchecked
,
:cannot_be_merged_recheck
,
:c
annot_be_merged_rechecking
,
:c
hecking
]
check_states
.
each
do
|
merge_status
|
expect
(
state_machine
.
check_state?
(
merge_status
)).
to
be
true
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment