From 01d3972d3e46663954306138a49040c343c4b403 Mon Sep 17 00:00:00 2001 From: nigel007 <609441862@qq.com> Date: Thu, 13 May 2021 22:28:57 +0800 Subject: [PATCH] add information --- src/forge/Merge/MessageCount.js | 62 +++++++++++++++++++++++++++++---- 1 file changed, 56 insertions(+), 6 deletions(-) diff --git a/src/forge/Merge/MessageCount.js b/src/forge/Merge/MessageCount.js index d9707833..fc77d543 100644 --- a/src/forge/Merge/MessageCount.js +++ b/src/forge/Merge/MessageCount.js @@ -45,6 +45,9 @@ class MessageCount extends Component { copyVisible:false, fix_issue_id: "", + unclosed_issue_list: [], + ownername: undefined, + reponame: undefined, }; } @@ -53,6 +56,7 @@ class MessageCount extends Component { SpinFlag: true, }); this.getDetail(); + this.getUnclosedIssueList(); // this.clickBody(); }; @@ -68,6 +72,8 @@ class MessageCount extends Component { getDetail = () => { const { projectsId, mergeId, owner } = this.props.match.params; + this.state.ownername = owner; + this.state.reponame = projectsId; const url = `/${owner}/${projectsId}/pulls/${mergeId}.json`; axios .get(url) @@ -171,6 +177,41 @@ class MessageCount extends Component { }); }; + renderIssueList = (list) => { + if (list && list.length > 0) { + return list.map((item, index) => { + return ( + + ); + }); + } + }; + + getUnclosedIssueList = () => { + const url = `/projects/blockchain/get_unclosed_issue_list`; + axios.get(url,{ + params:{ + "ownername": this.state.ownername, + "reponame": this.state.reponame + } + }).then(result=>{ + if(result && result.data){ + this.state.unclosed_issue_list = result.data.unclosed_issues; + } + }).catch(error=>{ + console.log(error); + }) + } + + selectIssueChange = (selectedKeys, info) => { + this.state.fix_issue_id = selectedKeys; + }; + submitmerge = () => { if (this.state.mergekey === "rebase") { this.setState({ @@ -497,12 +538,21 @@ class MessageCount extends Component { value={this.state.body} onChange={this.changbodypr} /> - + {/**/} +