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

mutations.js « store « codequality_report « reports « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 249c2f35c0ba09de113dff84749bcfdacfe2629d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import * as types from './mutation_types';

export default {
  [types.SET_PATHS](state, paths) {
    state.baseBlobPath = paths.baseBlobPath;
    state.headBlobPath = paths.headBlobPath;
    state.reportsPath = paths.reportsPath;
    state.helpPath = paths.helpPath;
  },
  [types.REQUEST_REPORTS](state) {
    state.isLoading = true;
  },
  [types.RECEIVE_REPORTS_SUCCESS](state, data) {
    state.hasError = false;
    state.status = '';
    state.statusReason = '';
    state.isLoading = false;
    state.newIssues = data.newIssues;
    state.resolvedIssues = data.resolvedIssues;
  },
  [types.RECEIVE_REPORTS_ERROR](state, error) {
    state.isLoading = false;
    state.hasError = true;
    state.status = error?.status || '';
    state.statusReason = error?.response?.data?.status_reason;
  },
};