Skip to content

Commit

Permalink
【PAC】feat:支持从代码库维度查看对应的代码库事件 #8122
Browse files Browse the repository at this point in the history
  • Loading branch information
mingshewhe committed Oct 27, 2023
1 parent 403de73 commit 1dad974
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -198,24 +198,6 @@ class PipelineWebhookDao {
}
}

fun listWebhookPipeline(
dslContext: DSLContext,
projectId: String,
pipelineId: String,
repositoryType: String,
eventType: String
): List<PipelineWebhook> {
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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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失败,就会导致数据不一致,不更新
Expand Down

0 comments on commit 1dad974

Please sign in to comment.