diff options
author | Natalia Tepluhina <ntepluhina@gitlab.com> | 2019-03-25 09:16:41 +0000 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2019-03-25 09:16:41 +0000 |
commit | a72241f4a92ab0b202eb3c7e03931857428237b6 (patch) | |
tree | 51d02b8aa0345b72a2708abd78baa160221b460d /app/assets/javascripts/ide/stores/modules | |
parent | 9e98ccf174410209e313956bcf10c0da0aec572f (diff) | |
download | gitlab-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.js | 4 |
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; |