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
a7225111
Commit
a7225111
authored
May 24, 2018
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extract a do_execute method to be overridden
parent
ec31fa26
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
app/services/merge_requests/refresh_service.rb
app/services/merge_requests/refresh_service.rb
+6
-2
No files found.
app/services/merge_requests/refresh_service.rb
View file @
a7225111
...
...
@@ -3,6 +3,12 @@ module MergeRequests
def
execute
(
oldrev
,
newrev
,
ref
)
return
true
unless
Gitlab
::
Git
.
branch_ref?
(
ref
)
do_execute
(
oldrev
,
newrev
,
ref
)
end
private
def
do_execute
(
oldrev
,
newrev
,
ref
)
@oldrev
,
@newrev
=
oldrev
,
newrev
@branch_name
=
Gitlab
::
Git
.
ref_name
(
ref
)
...
...
@@ -28,8 +34,6 @@ module MergeRequests
true
end
private
def
close_upon_missing_source_branch_ref
# MergeRequest#reload_diff ignores not opened MRs. This means it won't
# create an `empty` diff for `closed` MRs without a source branch, keeping
...
...
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