Skip to content
Snippets Groups Projects

Users can apply multiple suggestions at once.

Merged Jesse Hall requested to merge jessehall3/gitlab-ee:25486-batch-suggestions into master
2 files
+ 27
12
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -523,12 +523,15 @@ export const submitSuggestionBatch = (
return dispatch('resolveDiscussion', { discussionId }).catch(() => {});
});
const resolveDiscussionsAndClearBatch = () =>
Promise.all(resolveAllDiscussions())
.finally(() => commit(types.CLEAR_SUGGESTION_BATCH));
commit(types.SET_APPLYING_BATCH_STATE);
return Api.applySuggestionBatch(suggestionIds)
.then(() => Promise.all(applyAllSuggestions()))
.then(() => Promise.all(resolveAllDiscussions()))
.then(() => commit(types.CLEAR_SUGGESTION_BATCH))
.then(() => resolveDiscussionsAndClearBatch())
.catch(err => {
const defaultMessage = __(
'Something went wrong while applying the batch of suggestions. Please try again.',
Loading