summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFatih Acet <acetfatih@gmail.com>2017-05-23 11:31:07 +0000
committerFatih Acet <acetfatih@gmail.com>2017-05-23 11:31:07 +0000
commit348afcd5ebce88a5385e6f31ab141fe6fb8bfce3 (patch)
treeb70909157dd641f8b308cf404cc4f43c37e89014
parent12e77890c29c0451ac7a1a59727df4d56bc9741b (diff)
parenta21d6ee0c761418ccfdbf40d06c7f5d6d2ac867e (diff)
downloadgitlab-ce-348afcd5ebce88a5385e6f31ab141fe6fb8bfce3.tar.gz
Merge branch '32480-follow-up-from-add-sha-mismatch-state-to-the-mr-widget' into 'master'
Resolve "Follow-up from "Add "SHA mismatch" state to the MR widget"" Closes #32480 See merge request !11466
-rw-r--r--app/assets/javascripts/vue_merge_request_widget/stores/mr_widget_store.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/app/assets/javascripts/vue_merge_request_widget/stores/mr_widget_store.js b/app/assets/javascripts/vue_merge_request_widget/stores/mr_widget_store.js
index 06661b930e3..c07bd25e6fd 100644
--- a/app/assets/javascripts/vue_merge_request_widget/stores/mr_widget_store.js
+++ b/app/assets/javascripts/vue_merge_request_widget/stores/mr_widget_store.js
@@ -4,7 +4,7 @@ import { getStateKey } from '../dependencies';
export default class MergeRequestStore {
constructor(data) {
- this.startingSha = data.diff_head_sha;
+ this.sha = data.diff_head_sha;
this.setData(data);
}
@@ -16,7 +16,6 @@ export default class MergeRequestStore {
this.targetBranch = data.target_branch;
this.sourceBranch = data.source_branch;
this.mergeStatus = data.merge_status;
- this.sha = data.diff_head_sha;
this.commitMessage = data.merge_commit_message;
this.commitMessageWithDescription = data.merge_commit_message_with_description;
this.commitsCount = data.commits_count;
@@ -69,7 +68,7 @@ export default class MergeRequestStore {
this.canMerge = !!data.merge_path;
this.canCreateIssue = currentUser.can_create_issue || false;
this.canCancelAutomaticMerge = !!data.cancel_merge_when_pipeline_succeeds_path;
- this.hasSHAChanged = this.sha !== this.startingSha;
+ this.hasSHAChanged = this.sha !== data.diff_head_sha;
this.canBeMerged = data.can_be_merged || false;
// Cherry-pick and Revert actions related