Merge pull request 'sonar状态判断优化' (#750) from Eeeros/forgeplus-react:feature_sonar into feature_sonar

1
This commit is contained in:
Eeeros 2024-06-20 15:07:54 +08:00
commit 7fd31eee0b
1 changed files with 6 additions and 2 deletions

View File

@ -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)
}
})
}