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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Slaughter <pslaughter@gitlab.com>2019-04-24 11:45:03 +0300
committerPaul Slaughter <pslaughter@gitlab.com>2019-04-24 11:45:03 +0300
commit218430bdde361a13f274beb558c5fd30b564b6c6 (patch)
tree4cb1741eb29732379969a8a0269c03c4c4314316 /app/assets/javascripts/ide/stores
parent4518806c9ca89f0403bfe92286c496cd12cd9393 (diff)
Create constants for IDE commit action values
**Why?** These values will be used to help build the mirroring diff. It is helpful keeping it controlled in a constant. **Links:** - https://gitlab.com/gitlab-org/gitlab-ee/issues/10232 - https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/11478
Diffstat (limited to 'app/assets/javascripts/ide/stores')
-rw-r--r--app/assets/javascripts/ide/stores/utils.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/app/assets/javascripts/ide/stores/utils.js b/app/assets/javascripts/ide/stores/utils.js
index 66c5180b782..bcc9ca60d9b 100644
--- a/app/assets/javascripts/ide/stores/utils.js
+++ b/app/assets/javascripts/ide/stores/utils.js
@@ -1,3 +1,5 @@
+import { commitActionTypes } from '../constants';
+
export const dataStructure = () => ({
id: '',
// Key will contain a mixture of ID and path
@@ -114,14 +116,14 @@ export const setPageTitle = title => {
export const commitActionForFile = file => {
if (file.prevPath) {
- return 'move';
+ return commitActionTypes.move;
} else if (file.deleted) {
- return 'delete';
+ return commitActionTypes.delete;
} else if (file.tempFile) {
- return 'create';
+ return commitActionTypes.create;
}
- return 'update';
+ return commitActionTypes.update;
};
export const getCommitFiles = stagedFiles =>