diff options
author | Robert Speicher <rspeicher@gmail.com> | 2021-01-20 13:34:23 -0600 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2021-01-20 13:34:23 -0600 |
commit | 6438df3a1e0fb944485cebf07976160184697d72 (patch) | |
tree | 00b09bfd170e77ae9391b1a2f5a93ef6839f2597 /spec/frontend/ide/helpers.js | |
parent | 42bcd54d971da7ef2854b896a7b34f4ef8601067 (diff) | |
download | gitlab-ce-6438df3a1e0fb944485cebf07976160184697d72.tar.gz |
Add latest changes from gitlab-org/gitlab@13-8-stable-eev13.8.0-rc42
Diffstat (limited to 'spec/frontend/ide/helpers.js')
-rw-r--r-- | spec/frontend/ide/helpers.js | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/spec/frontend/ide/helpers.js b/spec/frontend/ide/helpers.js index 6b65dd96ef4..f815c3d090e 100644 --- a/spec/frontend/ide/helpers.js +++ b/spec/frontend/ide/helpers.js @@ -12,9 +12,9 @@ export const file = (name = 'name', id = name, type = '', parent = null) => parentPath: parent ? parent.path : '', }); -export const createEntriesFromPaths = paths => +export const createEntriesFromPaths = (paths) => paths - .map(path => ({ + .map((path) => ({ name: pathUtils.basename(path), dir: pathUtils.dirname(path), ext: pathUtils.extname(path), @@ -30,7 +30,7 @@ export const createEntriesFromPaths = paths => }; }, {}); -export const createTriggerChangeAction = payload => ({ +export const createTriggerChangeAction = (payload) => ({ type: 'triggerFilesChange', ...(payload ? { payload } : {}), }); @@ -41,5 +41,10 @@ export const createTriggerRenamePayload = (path, newPath) => ({ newPath, }); +export const createTriggerUpdatePayload = (path) => ({ + type: commitActionTypes.update, + path, +}); + export const createTriggerRenameAction = (path, newPath) => createTriggerChangeAction(createTriggerRenamePayload(path, newPath)); |