diff options
Diffstat (limited to 'app/assets/javascripts/repo/stores/repo_store.js')
-rw-r--r-- | app/assets/javascripts/repo/stores/repo_store.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/app/assets/javascripts/repo/stores/repo_store.js b/app/assets/javascripts/repo/stores/repo_store.js index c633f538c1b..f8d29af7ffe 100644 --- a/app/assets/javascripts/repo/stores/repo_store.js +++ b/app/assets/javascripts/repo/stores/repo_store.js @@ -23,6 +23,7 @@ const RepoStore = { title: '', status: false, }, + showNewBranchDialog: false, activeFile: Helper.getDefaultActiveFile(), activeFileIndex: 0, activeLine: -1, @@ -31,6 +32,12 @@ const RepoStore = { isCommitable: false, binary: false, currentBranch: '', + startNewMR: false, + currentHash: '', + currentShortHash: '', + customBranchURL: '', + newMrTemplateUrl: '', + branchChanged: false, commitMessage: '', binaryTypes: { png: false, @@ -49,6 +56,17 @@ const RepoStore = { }); }, + setBranchHash() { + return Service.getBranch() + .then((data) => { + if (RepoStore.currentHash !== '' && data.commit.id !== RepoStore.currentHash) { + RepoStore.branchChanged = true; + } + RepoStore.currentHash = data.commit.id; + RepoStore.currentShortHash = data.commit.short_id; + }); + }, + // mutations checkIsCommitable() { RepoStore.isCommitable = RepoStore.onTopOfBranch && RepoStore.canCommit; |