From 862b2dcca55134e72ae3875e7d5908bf4f6344fa Mon Sep 17 00:00:00 2001 From: jamikxu Date: Fri, 11 Feb 2022 11:21:50 +0800 Subject: [PATCH 1/8] =?UTF-8?q?feat:=20=E7=BA=A2=E7=BA=BFgit=E8=AF=84?= =?UTF-8?q?=E8=AE=BA=E5=88=86=E5=BC=80=E5=8F=91=E9=80=81=20#6118?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../devops/plugin/service/ScmCheckService.kt | 48 +++++++++++-------- .../devops/plugin/utils/QualityUtils.kt | 5 +- 2 files changed, 30 insertions(+), 23 deletions(-) diff --git a/src/backend/ci/core/plugin/biz-plugin/src/main/kotlin/com/tencent/devops/plugin/service/ScmCheckService.kt b/src/backend/ci/core/plugin/biz-plugin/src/main/kotlin/com/tencent/devops/plugin/service/ScmCheckService.kt index 7459f97cb13..834486ed45d 100644 --- a/src/backend/ci/core/plugin/biz-plugin/src/main/kotlin/com/tencent/devops/plugin/service/ScmCheckService.kt +++ b/src/backend/ci/core/plugin/biz-plugin/src/main/kotlin/com/tencent/devops/plugin/service/ScmCheckService.kt @@ -40,6 +40,7 @@ import com.tencent.devops.plugin.api.pojo.GitCommitCheckEvent import com.tencent.devops.plugin.utils.QualityUtils import com.tencent.devops.process.utils.Credential import com.tencent.devops.process.utils.CredentialUtils +import com.tencent.devops.quality.api.v2.ServiceQualityInterceptResource import com.tencent.devops.repository.api.ServiceGithubResource import com.tencent.devops.repository.api.ServiceOauthResource import com.tencent.devops.repository.api.ServiceRepositoryResource @@ -98,27 +99,32 @@ class ScmCheckService @Autowired constructor(private val client: Client) { else -> throw OperationException("不是Git 代码仓库") } - val request = CommitCheckRequest( - projectName = repo.projectName, - url = repo.url, - type = type, - privateKey = null, - passPhrase = null, - token = token, - region = null, - commitId = commitId, - state = state, - targetUrl = targetUrl, - context = context, - description = description, - block = block, - mrRequestId = event.mergeRequestId, - reportData = QualityUtils.getQualityGitMrResult(client, event) - ) - if (isOauth) { - client.get(ServiceScmOauthResource::class).addCommitCheck(request) - } else { - client.get(ServiceScmResource::class).addCommitCheck(request) + // 红线评论分开发送 + val qualityHistory = client.get(ServiceQualityInterceptResource::class) + .listHistory(projectId, pipelineId, buildId).data + qualityHistory?.forEach { history -> + val request = CommitCheckRequest( + projectName = repo.projectName, + url = repo.url, + type = type, + privateKey = null, + passPhrase = null, + token = token, + region = null, + commitId = commitId, + state = state, + targetUrl = targetUrl, + context = context, + description = description, + block = block, + mrRequestId = event.mergeRequestId, + reportData = QualityUtils.getQualityGitMrResult(client, event, listOf(history.ruleHashId)) + ) + if (isOauth) { + client.get(ServiceScmOauthResource::class).addCommitCheck(request) + } else { + client.get(ServiceScmResource::class).addCommitCheck(request) + } } return repo.projectName } diff --git a/src/backend/ci/core/plugin/biz-plugin/src/main/kotlin/com/tencent/devops/plugin/utils/QualityUtils.kt b/src/backend/ci/core/plugin/biz-plugin/src/main/kotlin/com/tencent/devops/plugin/utils/QualityUtils.kt index 54d36864672..b3f90f39a03 100644 --- a/src/backend/ci/core/plugin/biz-plugin/src/main/kotlin/com/tencent/devops/plugin/utils/QualityUtils.kt +++ b/src/backend/ci/core/plugin/biz-plugin/src/main/kotlin/com/tencent/devops/plugin/utils/QualityUtils.kt @@ -45,7 +45,8 @@ import com.tencent.devops.quality.constant.codeccToolUrlPathMap object QualityUtils { fun getQualityGitMrResult( client: Client, - event: GitCommitCheckEvent + event: GitCommitCheckEvent, + ruleIds: List ): Pair, MutableMap>>> { val projectId = event.projectId val pipelineId = event.pipelineId @@ -68,7 +69,7 @@ object QualityUtils { // value:指标、预期、结果、状态 val resultMap = mutableMapOf>>() client.get(ServiceQualityInterceptResource::class) - .listHistory(projectId, pipelineId, buildId).data?.forEach { ruleIntercept -> + .listRuleHistory(projectId, pipelineId, buildId, ruleIds).data?.forEach { ruleIntercept -> ruleIntercept.resultMsg.forEach { interceptItem -> val indicator = client.get(ServiceQualityIndicatorResource::class) .get(projectId, interceptItem.indicatorId).data From 4b6d9141ec88f8c4fa470a0449a9ae2ee7eab044 Mon Sep 17 00:00:00 2001 From: jamikxu Date: Fri, 11 Feb 2022 12:00:57 +0800 Subject: [PATCH 2/8] =?UTF-8?q?feat:=20=E7=BA=A2=E7=BA=BFgit=E8=AF=84?= =?UTF-8?q?=E8=AE=BA=E5=88=86=E5=BC=80=E5=8F=91=E9=80=81=20#6118.=20fix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tencent/devops/quality/service/v2/QualityHistoryService.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/ci/core/quality/biz-quality/src/main/kotlin/com/tencent/devops/quality/service/v2/QualityHistoryService.kt b/src/backend/ci/core/quality/biz-quality/src/main/kotlin/com/tencent/devops/quality/service/v2/QualityHistoryService.kt index 3c15ad33be9..a9d535e8583 100644 --- a/src/backend/ci/core/quality/biz-quality/src/main/kotlin/com/tencent/devops/quality/service/v2/QualityHistoryService.kt +++ b/src/backend/ci/core/quality/biz-quality/src/main/kotlin/com/tencent/devops/quality/service/v2/QualityHistoryService.kt @@ -225,7 +225,7 @@ class QualityHistoryService @Autowired constructor( pipelineId = it.pipelineId, pipelineName = "", buildId = it.buildId, - ruleHashId = "", + ruleHashId = HashUtil.encodeLongId(it.ruleId), ruleName = ruleMap?.get(it.ruleId)?.name ?: "", interceptTime = it.createTime.timestampmilli(), result = RuleInterceptResult.valueOf(it.result), From 9fdae31c196b7d4257acf364811874167a2d5e1b Mon Sep 17 00:00:00 2001 From: jamikxu Date: Fri, 11 Feb 2022 15:12:01 +0800 Subject: [PATCH 3/8] =?UTF-8?q?feat:=20=E7=BA=A2=E7=BA=BFgit=E8=AF=84?= =?UTF-8?q?=E8=AE=BA=E5=88=86=E5=BC=80=E5=8F=91=E9=80=81=20#6118.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../devops/plugin/service/ScmCheckService.kt | 6 +- .../devops/plugin/utils/QualityUtils.kt | 55 +++++++++---------- .../api/v2/ServiceQualityInterceptResource.kt | 2 +- .../service/v2/QualityHistoryService.kt | 8 ++- 4 files changed, 36 insertions(+), 35 deletions(-) diff --git a/src/backend/ci/core/plugin/biz-plugin/src/main/kotlin/com/tencent/devops/plugin/service/ScmCheckService.kt b/src/backend/ci/core/plugin/biz-plugin/src/main/kotlin/com/tencent/devops/plugin/service/ScmCheckService.kt index 834486ed45d..458d3a61668 100644 --- a/src/backend/ci/core/plugin/biz-plugin/src/main/kotlin/com/tencent/devops/plugin/service/ScmCheckService.kt +++ b/src/backend/ci/core/plugin/biz-plugin/src/main/kotlin/com/tencent/devops/plugin/service/ScmCheckService.kt @@ -100,9 +100,9 @@ class ScmCheckService @Autowired constructor(private val client: Client) { throw OperationException("不是Git 代码仓库") } // 红线评论分开发送 - val qualityHistory = client.get(ServiceQualityInterceptResource::class) + val interceptHistory = client.get(ServiceQualityInterceptResource::class) .listHistory(projectId, pipelineId, buildId).data - qualityHistory?.forEach { history -> + interceptHistory?.forEach { ruleIntercept -> val request = CommitCheckRequest( projectName = repo.projectName, url = repo.url, @@ -118,7 +118,7 @@ class ScmCheckService @Autowired constructor(private val client: Client) { description = description, block = block, mrRequestId = event.mergeRequestId, - reportData = QualityUtils.getQualityGitMrResult(client, event, listOf(history.ruleHashId)) + reportData = QualityUtils.getQualityGitMrResult(client, event, ruleIntercept) ) if (isOauth) { client.get(ServiceScmOauthResource::class).addCommitCheck(request) diff --git a/src/backend/ci/core/plugin/biz-plugin/src/main/kotlin/com/tencent/devops/plugin/utils/QualityUtils.kt b/src/backend/ci/core/plugin/biz-plugin/src/main/kotlin/com/tencent/devops/plugin/utils/QualityUtils.kt index b3f90f39a03..f0c3d30404b 100644 --- a/src/backend/ci/core/plugin/biz-plugin/src/main/kotlin/com/tencent/devops/plugin/utils/QualityUtils.kt +++ b/src/backend/ci/core/plugin/biz-plugin/src/main/kotlin/com/tencent/devops/plugin/utils/QualityUtils.kt @@ -30,13 +30,13 @@ package com.tencent.devops.plugin.utils import com.tencent.devops.common.api.util.DateTimeUtil import com.tencent.devops.common.client.Client import com.tencent.devops.common.pipeline.enums.StartType +import com.tencent.devops.common.quality.pojo.QualityRuleIntercept import com.tencent.devops.common.service.utils.HomeHostUtil import com.tencent.devops.plugin.api.pojo.GitCommitCheckEvent import com.tencent.devops.plugin.codecc.CodeccUtils import com.tencent.devops.process.api.service.ServicePipelineResource import com.tencent.devops.process.api.service.ServiceVarResource import com.tencent.devops.quality.api.v2.ServiceQualityIndicatorResource -import com.tencent.devops.quality.api.v2.ServiceQualityInterceptResource import com.tencent.devops.common.quality.pojo.enums.QualityOperation import com.tencent.devops.quality.constant.DEFAULT_CODECC_URL import com.tencent.devops.quality.constant.codeccToolUrlPathMap @@ -46,7 +46,7 @@ object QualityUtils { fun getQualityGitMrResult( client: Client, event: GitCommitCheckEvent, - ruleIds: List + ruleIntercept: QualityRuleIntercept ): Pair, MutableMap>>> { val projectId = event.projectId val pipelineId = event.pipelineId @@ -68,35 +68,32 @@ object QualityUtils { // key:质量红线产出插件 // value:指标、预期、结果、状态 val resultMap = mutableMapOf>>() - client.get(ServiceQualityInterceptResource::class) - .listRuleHistory(projectId, pipelineId, buildId, ruleIds).data?.forEach { ruleIntercept -> - ruleIntercept.resultMsg.forEach { interceptItem -> - val indicator = client.get(ServiceQualityIndicatorResource::class) - .get(projectId, interceptItem.indicatorId).data - val indicatorElementName = indicator?.elementType ?: "" - val elementCnName = ElementUtils.getElementCnName(indicatorElementName, projectId) - val resultList = resultMap[elementCnName] ?: mutableListOf() - val actualValue = if (CodeccUtils.isCodeccAtom(indicatorElementName)) { - getActualValue( - projectId = projectId, - pipelineId = pipelineId, - buildId = buildId, - detail = indicator?.elementDetail, - value = interceptItem.actualValue ?: "null", - client = client) - } else { - interceptItem.actualValue ?: "null" - } - resultList.add(listOf( - interceptItem.indicatorName, - actualValue, - QualityOperation.convertToSymbol(interceptItem.operation) + "" + interceptItem.value, - interceptItem.pass.toString(), "" - )) - resultMap[elementCnName] = resultList + ruleIntercept.resultMsg.forEach { interceptItem -> + val indicator = client.get(ServiceQualityIndicatorResource::class) + .get(projectId, interceptItem.indicatorId).data + val indicatorElementName = indicator?.elementType ?: "" + val elementCnName = ElementUtils.getElementCnName(indicatorElementName, projectId) + val resultList = resultMap[elementCnName] ?: mutableListOf() + val actualValue = if (CodeccUtils.isCodeccAtom(indicatorElementName)) { + getActualValue( + projectId = projectId, + pipelineId = pipelineId, + buildId = buildId, + detail = indicator?.elementDetail, + value = interceptItem.actualValue ?: "null", + client = client) + } else { + interceptItem.actualValue ?: "null" } - ruleName.add(ruleIntercept.ruleName) + resultList.add(listOf( + interceptItem.indicatorName, + actualValue, + QualityOperation.convertToSymbol(interceptItem.operation) + "" + interceptItem.value, + interceptItem.pass.toString(), "" + )) + resultMap[elementCnName] = resultList } + ruleName.add(ruleIntercept.ruleName) titleData.add(ruleName.joinToString("、")) return Pair(titleData, resultMap) } diff --git a/src/backend/ci/core/quality/api-quality/src/main/kotlin/com/tencent/devops/quality/api/v2/ServiceQualityInterceptResource.kt b/src/backend/ci/core/quality/api-quality/src/main/kotlin/com/tencent/devops/quality/api/v2/ServiceQualityInterceptResource.kt index b8856c8d55c..f0a4eb21364 100644 --- a/src/backend/ci/core/quality/api-quality/src/main/kotlin/com/tencent/devops/quality/api/v2/ServiceQualityInterceptResource.kt +++ b/src/backend/ci/core/quality/api-quality/src/main/kotlin/com/tencent/devops/quality/api/v2/ServiceQualityInterceptResource.kt @@ -69,7 +69,7 @@ interface ServiceQualityInterceptResource { buildId: String ): Result> - @ApiOperation("获取红线执行历史") + @ApiOperation("获取stream红线执行历史") @Path("/project/{projectId}/pipeline/{pipelineId}/build/{buildId}/history") @POST fun listRuleHistory( diff --git a/src/backend/ci/core/quality/biz-quality/src/main/kotlin/com/tencent/devops/quality/service/v2/QualityHistoryService.kt b/src/backend/ci/core/quality/biz-quality/src/main/kotlin/com/tencent/devops/quality/service/v2/QualityHistoryService.kt index a9d535e8583..92d1beef80d 100644 --- a/src/backend/ci/core/quality/biz-quality/src/main/kotlin/com/tencent/devops/quality/service/v2/QualityHistoryService.kt +++ b/src/backend/ci/core/quality/biz-quality/src/main/kotlin/com/tencent/devops/quality/service/v2/QualityHistoryService.kt @@ -207,7 +207,11 @@ class QualityHistoryService @Autowired constructor( ) } - fun serviceListByBuildId(projectId: String, pipelineId: String, buildId: String): List { + fun serviceListByBuildId( + projectId: String, + pipelineId: String, + buildId: String + ): List { val interceptHistory = historyDao.listByBuildId( dslContext = dslContext, projectId = projectId, @@ -220,7 +224,7 @@ class QualityHistoryService @Autowired constructor( projectId = projectId, ruleIds = ruleIdSet )?.map { it.id to it }?.toMap() - return interceptHistory.map { + return interceptHistory.distinctBy { it.ruleId }.map { QualityRuleIntercept( pipelineId = it.pipelineId, pipelineName = "", From 75d234c8e55224ed36ccec26ff3ffc25dee96d0d Mon Sep 17 00:00:00 2001 From: jamikxu Date: Fri, 11 Feb 2022 17:20:00 +0800 Subject: [PATCH 4/8] =?UTF-8?q?feat:=20=E7=BA=A2=E7=BA=BFgit=E8=AF=84?= =?UTF-8?q?=E8=AE=BA=E5=88=86=E5=BC=80=E5=8F=91=E9=80=81=20#6118=20=20add?= =?UTF-8?q?=20log?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../devops/quality/service/v2/QualityHistoryService.kt | 1 + .../com/tencent/devops/quality/util/QualityUrlUtils.kt | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/backend/ci/core/quality/biz-quality/src/main/kotlin/com/tencent/devops/quality/service/v2/QualityHistoryService.kt b/src/backend/ci/core/quality/biz-quality/src/main/kotlin/com/tencent/devops/quality/service/v2/QualityHistoryService.kt index 92d1beef80d..c6eb8c03b4a 100644 --- a/src/backend/ci/core/quality/biz-quality/src/main/kotlin/com/tencent/devops/quality/service/v2/QualityHistoryService.kt +++ b/src/backend/ci/core/quality/biz-quality/src/main/kotlin/com/tencent/devops/quality/service/v2/QualityHistoryService.kt @@ -268,6 +268,7 @@ class QualityHistoryService @Autowired constructor( detail = record.detail, client = client ) + logger.info("QUALITY|logPromt is: ${record.logPrompt}") } } QualityRuleIntercept( diff --git a/src/backend/ci/core/quality/biz-quality/src/main/kotlin/com/tencent/devops/quality/util/QualityUrlUtils.kt b/src/backend/ci/core/quality/biz-quality/src/main/kotlin/com/tencent/devops/quality/util/QualityUrlUtils.kt index b8907894b98..c3e75a37462 100644 --- a/src/backend/ci/core/quality/biz-quality/src/main/kotlin/com/tencent/devops/quality/util/QualityUrlUtils.kt +++ b/src/backend/ci/core/quality/biz-quality/src/main/kotlin/com/tencent/devops/quality/util/QualityUrlUtils.kt @@ -32,6 +32,7 @@ import com.tencent.devops.plugin.codecc.CodeccUtils import com.tencent.devops.process.api.service.ServiceVarResource import com.tencent.devops.quality.constant.DEFAULT_CODECC_URL import com.tencent.devops.quality.constant.codeccToolUrlPathMap +import org.slf4j.LoggerFactory import org.springframework.beans.factory.annotation.Value import org.springframework.stereotype.Component @@ -41,6 +42,8 @@ class QualityUrlUtils { @Value("\${quality.codecc.host:}") private val codeccHost: String = "" + private val logger = LoggerFactory.getLogger(QualityUrlUtils::class.java) + fun getCodeCCUrl( projectId: String, pipelineId: String, @@ -58,6 +61,7 @@ class QualityUrlUtils { return if (detail.isNullOrBlank() || detail!!.split(",").size > 1) { "http://$codeccHost/codecc/$projectId/task/$taskId/detail?buildId=$buildId" } else { + logger.info("QUALITY|codeccUrl: $projectId, $taskId, $buildId") val detailValue = codeccToolUrlPathMap[detail] ?: DEFAULT_CODECC_URL val fillDetailUrl = detailValue.replace("##projectId##", projectId) .replace("##taskId##", taskId.toString()) @@ -65,6 +69,5 @@ class QualityUrlUtils { .replace("##detail##", detail) "http://$codeccHost$fillDetailUrl" } - return "" } } From 228e2945a52d83cda1a9c96d1e9c15f1d01b8241 Mon Sep 17 00:00:00 2001 From: jamikxu Date: Sat, 12 Feb 2022 13:59:18 +0800 Subject: [PATCH 5/8] =?UTF-8?q?feat:=20=E7=BA=A2=E7=BA=BFgit=E8=AF=84?= =?UTF-8?q?=E8=AE=BA=E5=88=86=E5=BC=80=E5=8F=91=E9=80=81=20#6118?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tencent/devops/quality/service/v2/QualityHistoryService.kt | 3 +-- .../kotlin/com/tencent/devops/quality/util/QualityUrlUtils.kt | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/backend/ci/core/quality/biz-quality/src/main/kotlin/com/tencent/devops/quality/service/v2/QualityHistoryService.kt b/src/backend/ci/core/quality/biz-quality/src/main/kotlin/com/tencent/devops/quality/service/v2/QualityHistoryService.kt index c6eb8c03b4a..f62a1eeb40d 100644 --- a/src/backend/ci/core/quality/biz-quality/src/main/kotlin/com/tencent/devops/quality/service/v2/QualityHistoryService.kt +++ b/src/backend/ci/core/quality/biz-quality/src/main/kotlin/com/tencent/devops/quality/service/v2/QualityHistoryService.kt @@ -268,7 +268,6 @@ class QualityHistoryService @Autowired constructor( detail = record.detail, client = client ) - logger.info("QUALITY|logPromt is: ${record.logPrompt}") } } QualityRuleIntercept( @@ -280,7 +279,7 @@ class QualityHistoryService @Autowired constructor( interceptTime = it.createTime.timestampmilli(), result = RuleInterceptResult.valueOf(it.result), checkTimes = it.checkTimes, - resultMsg = interceptList + resultMsg =interceptList ) } } diff --git a/src/backend/ci/core/quality/biz-quality/src/main/kotlin/com/tencent/devops/quality/util/QualityUrlUtils.kt b/src/backend/ci/core/quality/biz-quality/src/main/kotlin/com/tencent/devops/quality/util/QualityUrlUtils.kt index c3e75a37462..421cf8eebe3 100644 --- a/src/backend/ci/core/quality/biz-quality/src/main/kotlin/com/tencent/devops/quality/util/QualityUrlUtils.kt +++ b/src/backend/ci/core/quality/biz-quality/src/main/kotlin/com/tencent/devops/quality/util/QualityUrlUtils.kt @@ -61,7 +61,6 @@ class QualityUrlUtils { return if (detail.isNullOrBlank() || detail!!.split(",").size > 1) { "http://$codeccHost/codecc/$projectId/task/$taskId/detail?buildId=$buildId" } else { - logger.info("QUALITY|codeccUrl: $projectId, $taskId, $buildId") val detailValue = codeccToolUrlPathMap[detail] ?: DEFAULT_CODECC_URL val fillDetailUrl = detailValue.replace("##projectId##", projectId) .replace("##taskId##", taskId.toString()) From ff43cae92c3e0ece60741ae2726aaeb6ae824887 Mon Sep 17 00:00:00 2001 From: jamikxu Date: Sat, 12 Feb 2022 14:01:02 +0800 Subject: [PATCH 6/8] =?UTF-8?q?feat:=20=E7=BA=A2=E7=BA=BFgit=E8=AF=84?= =?UTF-8?q?=E8=AE=BA=E5=88=86=E5=BC=80=E5=8F=91=E9=80=81=20#6118?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tencent/devops/quality/service/v2/QualityHistoryService.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/ci/core/quality/biz-quality/src/main/kotlin/com/tencent/devops/quality/service/v2/QualityHistoryService.kt b/src/backend/ci/core/quality/biz-quality/src/main/kotlin/com/tencent/devops/quality/service/v2/QualityHistoryService.kt index f62a1eeb40d..92d1beef80d 100644 --- a/src/backend/ci/core/quality/biz-quality/src/main/kotlin/com/tencent/devops/quality/service/v2/QualityHistoryService.kt +++ b/src/backend/ci/core/quality/biz-quality/src/main/kotlin/com/tencent/devops/quality/service/v2/QualityHistoryService.kt @@ -279,7 +279,7 @@ class QualityHistoryService @Autowired constructor( interceptTime = it.createTime.timestampmilli(), result = RuleInterceptResult.valueOf(it.result), checkTimes = it.checkTimes, - resultMsg =interceptList + resultMsg = interceptList ) } } From d74f7faebd5ad36f8329fd3b79a000641467f296 Mon Sep 17 00:00:00 2001 From: jamikxu Date: Sat, 12 Feb 2022 14:41:05 +0800 Subject: [PATCH 7/8] =?UTF-8?q?feat:=20=E7=BA=A2=E7=BA=BFgit=E8=AF=84?= =?UTF-8?q?=E8=AE=BA=E5=88=86=E5=BC=80=E5=8F=91=E9=80=81=20#6118?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../devops/quality/service/v2/QualityHistoryService.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/backend/ci/core/quality/biz-quality/src/main/kotlin/com/tencent/devops/quality/service/v2/QualityHistoryService.kt b/src/backend/ci/core/quality/biz-quality/src/main/kotlin/com/tencent/devops/quality/service/v2/QualityHistoryService.kt index 92d1beef80d..dc0375d0d2e 100644 --- a/src/backend/ci/core/quality/biz-quality/src/main/kotlin/com/tencent/devops/quality/service/v2/QualityHistoryService.kt +++ b/src/backend/ci/core/quality/biz-quality/src/main/kotlin/com/tencent/devops/quality/service/v2/QualityHistoryService.kt @@ -278,8 +278,8 @@ class QualityHistoryService @Autowired constructor( ruleName = ruleMap[it.ruleId]?.ruleName ?: "", interceptTime = it.createTime.timestampmilli(), result = RuleInterceptResult.valueOf(it.result), - checkTimes = it.checkTimes, - resultMsg = interceptList + resultMsg = interceptList, + checkTimes = it.checkTimes ) } } From 749501a65a5bc2e6e92a1e5c70b0630a88a3787c Mon Sep 17 00:00:00 2001 From: jamikxu Date: Sat, 12 Feb 2022 15:02:43 +0800 Subject: [PATCH 8/8] =?UTF-8?q?feat:=20=E7=BA=A2=E7=BA=BFgit=E8=AF=84?= =?UTF-8?q?=E8=AE=BA=E5=88=86=E5=BC=80=E5=8F=91=E9=80=81=20#6118?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../devops/quality/service/v2/QualityHistoryService.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/backend/ci/core/quality/biz-quality/src/main/kotlin/com/tencent/devops/quality/service/v2/QualityHistoryService.kt b/src/backend/ci/core/quality/biz-quality/src/main/kotlin/com/tencent/devops/quality/service/v2/QualityHistoryService.kt index dc0375d0d2e..92d1beef80d 100644 --- a/src/backend/ci/core/quality/biz-quality/src/main/kotlin/com/tencent/devops/quality/service/v2/QualityHistoryService.kt +++ b/src/backend/ci/core/quality/biz-quality/src/main/kotlin/com/tencent/devops/quality/service/v2/QualityHistoryService.kt @@ -278,8 +278,8 @@ class QualityHistoryService @Autowired constructor( ruleName = ruleMap[it.ruleId]?.ruleName ?: "", interceptTime = it.createTime.timestampmilli(), result = RuleInterceptResult.valueOf(it.result), - resultMsg = interceptList, - checkTimes = it.checkTimes + checkTimes = it.checkTimes, + resultMsg = interceptList ) } }