summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/ide/stores/modules
diff options
context:
space:
mode:
authorNatalia Tepluhina <ntepluhina@gitlab.com>2019-03-25 09:16:41 +0000
committerPhil Hughes <me@iamphill.com>2019-03-25 09:16:41 +0000
commita72241f4a92ab0b202eb3c7e03931857428237b6 (patch)
tree51d02b8aa0345b72a2708abd78baa160221b460d /app/assets/javascripts/ide/stores/modules
parent9e98ccf174410209e313956bcf10c0da0aec572f (diff)
downloadgitlab-ce-a72241f4a92ab0b202eb3c7e03931857428237b6.tar.gz
Fixed commit logic to pick a branch
- fixed getter spec with correct getter name
Diffstat (limited to 'app/assets/javascripts/ide/stores/modules')
-rw-r--r--app/assets/javascripts/ide/stores/modules/commit/getters.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/assets/javascripts/ide/stores/modules/commit/getters.js b/app/assets/javascripts/ide/stores/modules/commit/getters.js
index 03777e6c10b..bbe40b2ec2f 100644
--- a/app/assets/javascripts/ide/stores/modules/commit/getters.js
+++ b/app/assets/javascripts/ide/stores/modules/commit/getters.js
@@ -14,7 +14,7 @@ const createTranslatedTextForFiles = (files, text) => {
export const discardDraftButtonDisabled = state =>
state.commitMessage === '' || state.submitCommitLoading;
-export const newBranchName = (state, _, rootState) =>
+export const placeholderBranchName = (state, _, rootState) =>
`${gon.current_username}-${rootState.currentBranchId}-patch-${`${new Date().getTime()}`.substr(
-BRANCH_SUFFIX_COUNT,
)}`;
@@ -25,7 +25,7 @@ export const branchName = (state, getters, rootState) => {
state.commitAction === consts.COMMIT_TO_NEW_BRANCH_MR
) {
if (state.newBranchName === '') {
- return getters.newBranchName;
+ return getters.placeholderBranchName;
}
return state.newBranchName;