diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2018-05-24 17:38:48 +0300 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2018-05-24 17:38:48 +0300 |
commit | a7225111b16eb5f8f6f00a6ea2a844ea94e50b5e (patch) | |
tree | 499b11a1a4c6fc1eea9cab224a37f67119c80c0b | |
parent | ec31fa260b9f438fe7e369c6f61d55c4f10441cc (diff) |
Extract a do_execute method to be overridden
-rw-r--r-- | app/services/merge_requests/refresh_service.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/app/services/merge_requests/refresh_service.rb b/app/services/merge_requests/refresh_service.rb index 1fb1796b56c..0127d781686 100644 --- a/app/services/merge_requests/refresh_service.rb +++ b/app/services/merge_requests/refresh_service.rb @@ -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 |