diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-31 15:11:37 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-31 15:11:37 +0300 |
commit | c62dd5ae440db9ad4696000a863fbcb53fe83498 (patch) | |
tree | 3e4c18cd7a475e6d81f80335d173f1eb3f9510d8 /app/assets/javascripts/merge_request.js | |
parent | aa88b9053d72f3f9b69ae5365b77595dcae5c0c3 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/merge_request.js')
-rw-r--r-- | app/assets/javascripts/merge_request.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/app/assets/javascripts/merge_request.js b/app/assets/javascripts/merge_request.js index 80eb94a5364..61abdca0a5b 100644 --- a/app/assets/javascripts/merge_request.js +++ b/app/assets/javascripts/merge_request.js @@ -95,10 +95,6 @@ MergeRequest.prototype.initMRBtnListeners = function () { .then(({ data }) => { draftToggle.removeAttribute('disabled'); - if (!window.gon?.features?.realtimeMrStatusChange) { - eventHub.$emit('MRWidgetUpdateRequested'); - } - MergeRequest.toggleDraftStatus(data.title, wipEvent === 'ready'); }) .catch(() => { @@ -155,6 +151,10 @@ MergeRequest.hideCloseButton = function () { }; MergeRequest.toggleDraftStatus = function (title, isReady) { + if (!window.gon?.features?.realtimeMrStatusChange) { + eventHub.$emit('MRWidgetUpdateRequested'); + } + if (isReady) { toast(__('Marked as ready. Merging is now allowed.')); } else { |