From 3d064c737e8448880e6180aeddc59000a01aa6a8 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Tue, 7 Apr 2020 06:09:25 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- .../javascripts/diffs/store/mutation_types.js | 3 +++ app/assets/javascripts/diffs/store/mutations.js | 12 +++++++++-- .../notes/components/discussion_counter.vue | 2 +- .../javascripts/releases/components/app_edit.vue | 2 +- .../repositories/git_http_controller.rb | 2 +- app/helpers/issuables_helper.rb | 23 ++++++++++++++++++++++ app/views/projects/issues/_issue.html.haml | 1 + .../merge_requests/_merge_request.html.haml | 1 + 8 files changed, 41 insertions(+), 5 deletions(-) (limited to 'app') diff --git a/app/assets/javascripts/diffs/store/mutation_types.js b/app/assets/javascripts/diffs/store/mutation_types.js index 4436935c1ec..699c61b3ddd 100644 --- a/app/assets/javascripts/diffs/store/mutation_types.js +++ b/app/assets/javascripts/diffs/store/mutation_types.js @@ -2,8 +2,11 @@ export const SET_BASE_CONFIG = 'SET_BASE_CONFIG'; export const SET_LOADING = 'SET_LOADING'; export const SET_BATCH_LOADING = 'SET_BATCH_LOADING'; export const SET_RETRIEVING_BATCHES = 'SET_RETRIEVING_BATCHES'; + export const SET_DIFF_DATA = 'SET_DIFF_DATA'; export const SET_DIFF_DATA_BATCH = 'SET_DIFF_DATA_BATCH'; +export const SET_DIFF_FILES = 'SET_DIFF_FILES'; + export const SET_DIFF_VIEW_TYPE = 'SET_DIFF_VIEW_TYPE'; export const SET_COVERAGE_DATA = 'SET_COVERAGE_DATA'; export const SET_MERGE_REQUEST_DIFFS = 'SET_MERGE_REQUEST_DIFFS'; diff --git a/app/assets/javascripts/diffs/store/mutations.js b/app/assets/javascripts/diffs/store/mutations.js index bb4c80b5759..3c00ae98e75 100644 --- a/app/assets/javascripts/diffs/store/mutations.js +++ b/app/assets/javascripts/diffs/store/mutations.js @@ -10,6 +10,10 @@ import { } from './utils'; import * as types from './mutation_types'; +function updateDiffFilesInState(state, files) { + return Object.assign(state, { diffFiles: files }); +} + export default { [types.SET_BASE_CONFIG](state, options) { const { @@ -46,6 +50,10 @@ export default { Object.assign(state, { retrievingBatches }); }, + [types.SET_DIFF_FILES](state, files) { + updateDiffFilesInState(state, files); + }, + [types.SET_DIFF_DATA](state, data) { let files = state.diffFiles; @@ -58,8 +66,8 @@ export default { Object.assign(state, { ...convertObjectPropsToCamelCase(data), - diffFiles: files, }); + updateDiffFilesInState(state, files); }, [types.SET_DIFF_DATA_BATCH](state, data) { @@ -67,8 +75,8 @@ export default { Object.assign(state, { ...convertObjectPropsToCamelCase(data), - diffFiles: files, }); + updateDiffFilesInState(state, files); }, [types.SET_COVERAGE_DATA](state, coverageFiles) { diff --git a/app/assets/javascripts/notes/components/discussion_counter.vue b/app/assets/javascripts/notes/components/discussion_counter.vue index c28ac94b3ed..07952f9edd9 100644 --- a/app/assets/javascripts/notes/components/discussion_counter.vue +++ b/app/assets/javascripts/notes/components/discussion_counter.vue @@ -98,7 +98,7 @@ export default { -
+