From e1ee035a5194980e855ad4bb59eba9983cec3f42 Mon Sep 17 00:00:00 2001 From: Yuanruitao <1075097840@qq.com> Date: Tue, 30 Aug 2022 11:28:33 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=94=AF=E6=8C=81Stream=E7=8E=AF?= =?UTF-8?q?=E5=A2=83=E7=9B=B4=E6=8E=A5=E8=B7=B3=E8=BD=ACCodeCC=E5=90=8E?= =?UTF-8?q?=E5=8F=B0=20#19?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../kotlin/com/tencent/devops/v3/CodeccCheckAtom.kt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/backend/core/src/main/kotlin/com/tencent/devops/v3/CodeccCheckAtom.kt b/src/backend/core/src/main/kotlin/com/tencent/devops/v3/CodeccCheckAtom.kt index 2833e08..93f2206 100644 --- a/src/backend/core/src/main/kotlin/com/tencent/devops/v3/CodeccCheckAtom.kt +++ b/src/backend/core/src/main/kotlin/com/tencent/devops/v3/CodeccCheckAtom.kt @@ -37,7 +37,8 @@ class CodeccCheckAtom : TaskAtom { CodeccSdkUtils.executeAsyncTask(asyncTaskId, atomContext.param.pipelineStartUserName) atomContext.param.codeCCTaskId = asyncTaskId.toString() print("启动异步CodeCC任务成功,") - CodeccReportUtilsV2.asyncReport(atomContext, detailLink(atomContext.param.projectName, atomContext.param.codeCCTaskId)) + CodeccReportUtilsV2.asyncReport(atomContext, detailLink(atomContext.param.projectName, + atomContext.param.codeCCTaskId, atomContext.param.channelCode)) return } println("asyncTask is false") @@ -89,7 +90,7 @@ class CodeccCheckAtom : TaskAtom { LogUtils.printDebugLog("atomContext.result.message: ${atomContext.result.message}") LogUtils.printDebugLog("atomContext.result.status: ${atomContext.result.status}") with(atomContext.param) { - println("CodeCC任务详情:查看详情") + println("CodeCC任务详情:查看详情") } //开源项目上报commitId @@ -103,8 +104,9 @@ class CodeccCheckAtom : TaskAtom { } } - private fun detailLink(projectName: String, codeCCTaskId: String?): String { - return if (projectName.startsWith("git_")) { + private fun detailLink(projectName: String, codeCCTaskId: String?, channelCode: String?): String { + return if (projectName.startsWith("git_") || projectName.startsWith("github_") + || (!channelCode.isNullOrBlank() && "GIT" == channelCode)) { "${codeccDetail}/codecc/$projectName/task/$codeCCTaskId/detail" } else { "${codeccFrontHost}/console/codecc/$projectName/task/$codeCCTaskId/detail"