From 3481a941f244148f9fe4ed0196a08fdc4a47886a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E5=BF=83=E5=AE=87?= Date: Thu, 20 Jun 2024 15:04:33 +0800 Subject: [PATCH] cont. --- src/forge/Server/quality/index.jsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/forge/Server/quality/index.jsx b/src/forge/Server/quality/index.jsx index 58c44e8b8..3f6d602f9 100644 --- a/src/forge/Server/quality/index.jsx +++ b/src/forge/Server/quality/index.jsx @@ -57,10 +57,14 @@ function IssueList(props) { if (projectDetail) { const { author, name } = projectDetail; document.title = `代码质量分析-${author.name}/${name}`; + if ( !projectDetail.has_actions ) { + setAnalysisStatus(actionStatus.none) + return + } setPageLoading(true) getActionList(owner, projectsId).then(res => { setPageLoading(false) - if (res.status === 0) { + if (res.status !== 0) { if (res.runs.length === 0) { setAnalysisStatus(actionStatus.none) } else { @@ -71,7 +75,7 @@ function IssueList(props) { } } } else { - setAnalysisStatus(actionStatus.none) + message.error(res.message) } }) }