Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-05-20 21:10:33 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-05-20 21:10:33 +0300
commit1cb90c3b4f04d42fa30f7903b10b32721c5fadac (patch)
tree7fcc5031b249c936a73dfbd4fe2594b1e0a2943d /app/assets/javascripts/batch_comments
parente45c8a7e74d4c1a1f7e12504df3611f797620166 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/batch_comments')
-rw-r--r--app/assets/javascripts/batch_comments/stores/modules/batch_comments/actions.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/app/assets/javascripts/batch_comments/stores/modules/batch_comments/actions.js b/app/assets/javascripts/batch_comments/stores/modules/batch_comments/actions.js
index 88be64d0a1a..a8c0b064595 100644
--- a/app/assets/javascripts/batch_comments/stores/modules/batch_comments/actions.js
+++ b/app/assets/javascripts/batch_comments/stores/modules/batch_comments/actions.js
@@ -41,11 +41,18 @@ export const deleteDraft = ({ commit, getters }, draft) =>
})
.catch(() => flash(__('An error occurred while deleting the comment')));
-export const fetchDrafts = ({ commit, getters }) =>
+export const fetchDrafts = ({ commit, getters, state, dispatch }) =>
service
.fetchDrafts(getters.getNotesData.draftsPath)
.then((res) => res.data)
.then((data) => commit(types.SET_BATCH_COMMENTS_DRAFTS, data))
+ .then(() => {
+ state.drafts.forEach((draft) => {
+ if (!draft.line_code) {
+ dispatch('convertToDiscussion', draft.discussion_id, { root: true });
+ }
+ });
+ })
.catch(() => flash(__('An error occurred while fetching pending comments')));
export const publishSingleDraft = ({ commit, dispatch, getters }, draftId) => {