Commit 8d2a1591 authored by Bryce Johnson's avatar Bryce Johnson

Update shouldRemoveSourceBranch against API entity changes.

parent 9b479f43
......@@ -11,7 +11,6 @@ export default class MergeRequestStore {
setData(data) {
const currentUser = data.current_user;
const pipelineStatus = data.pipeline ? data.pipeline.details.status : null;
const mergeParams = data.merge_params || {};
this.title = data.title;
this.targetBranch = data.target_branch;
......@@ -52,8 +51,7 @@ export default class MergeRequestStore {
this.cancelAutoMergePath = data.cancel_merge_when_pipeline_succeeds_path;
this.removeWIPPath = data.remove_wip_path;
this.sourceBranchRemoved = !data.source_branch_exists;
this.shouldRemoveSourceBranch = mergeParams.should_remove_source_branch ||
mergeParams.force_remove_source_branch === '1' || false;
this.shouldRemoveSourceBranch = data.remove_source_branch;
this.onlyAllowMergeIfPipelineSucceeds = data.only_allow_merge_if_pipeline_succeeds || false;
this.mergeWhenPipelineSucceeds = data.merge_when_pipeline_succeeds || false;
this.mergePath = data.merge_path;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment