From 1dad9745294927124d06e4977e4db6ffdb8fa3d2 Mon Sep 17 00:00:00 2001 From: mingshewhe Date: Fri, 27 Oct 2023 15:38:13 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90PAC=E3=80=91feat=EF=BC=9A=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E4=BB=8E=E4=BB=A3=E7=A0=81=E5=BA=93=E7=BB=B4=E5=BA=A6?= =?UTF-8?q?=E6=9F=A5=E7=9C=8B=E5=AF=B9=E5=BA=94=E7=9A=84=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E5=BA=93=E4=BA=8B=E4=BB=B6=20#8122?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../process/engine/dao/PipelineWebhookDao.kt | 18 ------------------ .../engine/service/PipelineWebhookService.kt | 5 ++++- 2 files changed, 4 insertions(+), 19 deletions(-) diff --git a/src/backend/ci/core/process/biz-base/src/main/kotlin/com/tencent/devops/process/engine/dao/PipelineWebhookDao.kt b/src/backend/ci/core/process/biz-base/src/main/kotlin/com/tencent/devops/process/engine/dao/PipelineWebhookDao.kt index 5f6a3a73ff2..aa9ca2c3340 100644 --- a/src/backend/ci/core/process/biz-base/src/main/kotlin/com/tencent/devops/process/engine/dao/PipelineWebhookDao.kt +++ b/src/backend/ci/core/process/biz-base/src/main/kotlin/com/tencent/devops/process/engine/dao/PipelineWebhookDao.kt @@ -198,24 +198,6 @@ class PipelineWebhookDao { } } - fun listWebhookPipeline( - dslContext: DSLContext, - projectId: String, - pipelineId: String, - repositoryType: String, - eventType: String - ): List { - with(T_PIPELINE_WEBHOOK) { - return dslContext.selectFrom(this) - .where(PROJECT_ID.eq(projectId)) - .and(PIPELINE_ID.eq(pipelineId)) - .and(REPOSITORY_TYPE.eq(repositoryType)) - .and(EVENT_TYPE.eq(eventType)) - .and(DELETE.eq(false)) - .fetch().map { convert(it) } - } - } - fun listWebhookPipeline( dslContext: DSLContext, projectName: String, diff --git a/src/backend/ci/core/process/biz-process/src/main/kotlin/com/tencent/devops/process/engine/service/PipelineWebhookService.kt b/src/backend/ci/core/process/biz-process/src/main/kotlin/com/tencent/devops/process/engine/service/PipelineWebhookService.kt index 1cabcd80645..765d0927a6f 100644 --- a/src/backend/ci/core/process/biz-process/src/main/kotlin/com/tencent/devops/process/engine/service/PipelineWebhookService.kt +++ b/src/backend/ci/core/process/biz-process/src/main/kotlin/com/tencent/devops/process/engine/service/PipelineWebhookService.kt @@ -732,7 +732,10 @@ class PipelineWebhookService @Autowired constructor( if (webhook.taskId.isNullOrBlank()) return@webhook val element = elementMap[webhook.taskId] ?: return@webhook val webhookElementParams = getElementRepositoryConfig(element, variable = params) - ?: return@webhook + ?: run{ + logger.info("webhook not find match element|${webhook.id}") + return@webhook + } val elementRepositoryConfig = webhookElementParams.repositoryConfig val webhookRepositoryConfig = getRepositoryConfig(webhook, params) // 插件的配置与表中数据不一致,如保存流水线时,注册webhook失败,就会导致数据不一致,不更新