diff options
author | Phil Hughes <me@iamphill.com> | 2019-02-04 18:35:16 +0300 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2019-02-04 18:35:16 +0300 |
commit | 280b6f6f8d038c4c28b32c5965e8a052adf4a052 (patch) | |
tree | e2f67c8cf63f475d76689f01afc6a4f1d632bb5b | |
parent | cf40530e665cdb6b32ee9d525e2c1c3bc5940b00 (diff) | |
parent | 1b929072f965c0a1ceced00fadd12766e8bcc2ca (diff) |
Merge branch 'ce-mr-widget-service-endpoints-method' into 'master'
CE Port of "Extract extension method from mr_widget_options"
See merge request gitlab-org/gitlab-ce!24891
-rw-r--r-- | app/assets/javascripts/vue_merge_request_widget/mr_widget_options.vue | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/app/assets/javascripts/vue_merge_request_widget/mr_widget_options.vue b/app/assets/javascripts/vue_merge_request_widget/mr_widget_options.vue index 0ce9d271845..57c4dfbe3b7 100644 --- a/app/assets/javascripts/vue_merge_request_widget/mr_widget_options.vue +++ b/app/assets/javascripts/vue_merge_request_widget/mr_widget_options.vue @@ -142,8 +142,8 @@ export default { } }, methods: { - createService(store) { - const endpoints = { + getServiceEndpoints(store) { + return { mergePath: store.mergePath, mergeCheckPath: store.mergeCheckPath, cancelAutoMergePath: store.cancelAutoMergePath, @@ -154,7 +154,9 @@ export default { mergeActionsContentPath: store.mergeActionsContentPath, rebasePath: store.rebasePath, }; - return new MRWidgetService(endpoints); + }, + createService(store) { + return new MRWidgetService(this.getServiceEndpoints(store)); }, checkStatus(cb, isRebased) { return this.service |