diff --git a/src/backend/ci/core/common/common-pipeline/src/main/kotlin/com/tencent/devops/common/pipeline/pojo/element/trigger/WebHookTriggerElement.kt b/src/backend/ci/core/common/common-pipeline/src/main/kotlin/com/tencent/devops/common/pipeline/pojo/element/trigger/WebHookTriggerElement.kt index 3556d038fa0..d29fbbf8a15 100644 --- a/src/backend/ci/core/common/common-pipeline/src/main/kotlin/com/tencent/devops/common/pipeline/pojo/element/trigger/WebHookTriggerElement.kt +++ b/src/backend/ci/core/common/common-pipeline/src/main/kotlin/com/tencent/devops/common/pipeline/pojo/element/trigger/WebHookTriggerElement.kt @@ -34,11 +34,3 @@ abstract class WebHookTriggerElement( override var id: String? = null, override var status: String? = null ) : Element(name, id, status) - -fun WebHookTriggerElement.joinToString(list: List?): String { - return if (list.isNullOrEmpty()) { - "" - } else { - list.joinToString(",") - } -} diff --git a/src/backend/ci/core/common/common-webhook/biz-common-webhook/src/main/kotlin/com/tencent/devops/common/webhook/service/code/param/GithubWebhookElementParams.kt b/src/backend/ci/core/common/common-webhook/biz-common-webhook/src/main/kotlin/com/tencent/devops/common/webhook/service/code/param/GithubWebhookElementParams.kt index 86633beb9c2..85a6be3cf02 100644 --- a/src/backend/ci/core/common/common-webhook/biz-common-webhook/src/main/kotlin/com/tencent/devops/common/webhook/service/code/param/GithubWebhookElementParams.kt +++ b/src/backend/ci/core/common/common-webhook/biz-common-webhook/src/main/kotlin/com/tencent/devops/common/webhook/service/code/param/GithubWebhookElementParams.kt @@ -30,7 +30,6 @@ package com.tencent.devops.common.webhook.service.code.param import com.tencent.devops.common.api.util.EnvUtils import com.tencent.devops.common.pipeline.pojo.element.trigger.CodeGithubWebHookTriggerElement import com.tencent.devops.common.pipeline.pojo.element.trigger.enums.CodeType -import com.tencent.devops.common.pipeline.pojo.element.trigger.joinToString import com.tencent.devops.common.pipeline.utils.RepositoryConfigUtils import com.tencent.devops.common.webhook.pojo.code.WebHookParams import org.springframework.stereotype.Service @@ -77,4 +76,12 @@ class GithubWebhookElementParams : ScmWebhookElementParams?): String { + return if (list.isNullOrEmpty()) { + "" + } else { + list.joinToString(",") + } + } }