Skip to content

Commit

Permalink
feat: 红线git评论分开发送 TencentBlueKing#6118 add log
Browse files Browse the repository at this point in the history
  • Loading branch information
JamiKX1 committed Feb 11, 2022
1 parent 9fdae31 commit 75d234c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@ class QualityHistoryService @Autowired constructor(
detail = record.detail,
client = client
)
logger.info("QUALITY|logPromt is: ${record.logPrompt}")
}
}
QualityRuleIntercept(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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,
Expand All @@ -58,13 +61,13 @@ 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())
.replace("##buildId##", buildId)
.replace("##detail##", detail)
"http://$codeccHost$fillDetailUrl"
}
return ""
}
}

0 comments on commit 75d234c

Please sign in to comment.