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

mutations.js « commit « modules « stores « ide « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 2cf6e8e6f3603ccd2c066018b275ba5e9212625c (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
28
29
30
31
32
33
import * as types from './mutation_types';

export default {
  [types.UPDATE_COMMIT_MESSAGE](state, commitMessage) {
    Object.assign(state, {
      commitMessage,
    });
  },
  [types.UPDATE_COMMIT_ACTION](state, { commitAction }) {
    Object.assign(state, { commitAction });
  },
  [types.UPDATE_NEW_BRANCH_NAME](state, newBranchName) {
    Object.assign(state, {
      newBranchName,
    });
  },
  [types.UPDATE_LOADING](state, submitCommitLoading) {
    Object.assign(state, {
      submitCommitLoading,
    });
  },
  [types.TOGGLE_SHOULD_CREATE_MR](state, shouldCreateMR) {
    Object.assign(state, {
      shouldCreateMR: shouldCreateMR === undefined ? !state.shouldCreateMR : shouldCreateMR,
    });
  },
  [types.CLEAR_ERROR](state) {
    state.commitError = null;
  },
  [types.SET_ERROR](state, error) {
    state.commitError = error;
  },
};