From d67862156ce768b2f96bfd79f3587fa916bb2073 Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Mon, 2 Aug 2021 15:32:51 +0800 Subject: [PATCH] update issue --- src/forge/Merge/NewMerge.js | 6 ++++-- src/forge/Settings/Webhooks/New.jsx | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/forge/Merge/NewMerge.js b/src/forge/Merge/NewMerge.js index 3382590ad..97df7fb1b 100644 --- a/src/forge/Merge/NewMerge.js +++ b/src/forge/Merge/NewMerge.js @@ -42,9 +42,10 @@ class NewMerge extends Component { componentDidUpdate=(preProps)=>{ const { project } = this.props; + const { pull } = this.state; let oldProject = preProps.project; if(project && oldProject && (oldProject.id !== project.id)){ - this.compareProject(this.state.id,"master","master"); + this.compareProject(this.state.id,pull,"master"); } } // 页面销毁取消监听 @@ -78,7 +79,8 @@ class NewMerge extends Component { this.set_default_pull(result.data.branches); this.set_default_merge(result.data.merge_projects); } - this.compareProject(result.data.id,"master","master"); + const { pull } = this.state; + this.compareProject(result.data.id,pull||"master","master"); this.setState({isSpin: false}) }) .catch((error) => { diff --git a/src/forge/Settings/Webhooks/New.jsx b/src/forge/Settings/Webhooks/New.jsx index a8201f729..28ecd0b3e 100644 --- a/src/forge/Settings/Webhooks/New.jsx +++ b/src/forge/Settings/Webhooks/New.jsx @@ -302,7 +302,7 @@ function New({ form , match , showNotification , history }) { 推送、创建,删除分支事件的分支白名单,使用 glob 模式匹配指定。若为空或 *,则将报告所有分支的事件。语法文档见github.com/gobwas/glob。示例:master,{'{'}master,release*{'}'}。} colon={false} style={{marginTop:'15px'}} >