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
20896b28
Commit
20896b28
authored
Feb 19, 2021
by
Kerri Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move #mark_as_checked last and add comment
parent
d8acf44c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
7 deletions
+9
-7
app/services/merge_requests/update_service.rb
app/services/merge_requests/update_service.rb
+9
-7
No files found.
app/services/merge_requests/update_service.rb
View file @
20896b28
...
...
@@ -60,13 +60,6 @@ module MergeRequests
track_title_and_desc_edits
(
merge_request
,
changed_fields
)
if
merge_request
.
previous_changes
.
include?
(
'target_branch'
)
||
merge_request
.
previous_changes
.
include?
(
'source_branch'
)
merge_request
.
mark_as_unchecked
end
handle_milestone_change
(
merge_request
)
added_labels
=
merge_request
.
labels
-
old_labels
if
added_labels
.
present?
notification_service
.
async
.
relabeled_merge_request
(
...
...
@@ -85,6 +78,15 @@ module MergeRequests
current_user
)
end
# Since #mark_as_unchecked triggers an update action through the MR's
# state machine, we want to push this as far down in the process so we
# avoid resetting #ActiveModel::Dirty
#
if
merge_request
.
previous_changes
.
include?
(
'target_branch'
)
||
merge_request
.
previous_changes
.
include?
(
'source_branch'
)
merge_request
.
mark_as_unchecked
end
end
# rubocop:enable Metrics/AbcSize
...
...
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