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
Compare and Show latest version
3 files
+ 18
20
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -499,14 +499,12 @@ export const submitSuggestionBatch = ({ commit, dispatch, state }, { flashContai
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(() => resolveDiscussionsAndClearBatch())
.then(() => Promise.all(resolveAllDiscussions()))
.then(() => commit(types.CLEAR_SUGGESTION_BATCH))
.catch(err => {
const defaultMessage = __(
'Something went wrong while applying the batch of suggestions. Please try again.',
Loading