Skip to content

Commit

Permalink
feat:新建/编辑流水线时支持调试流水线 #8164 修复构建历史区分源材料分支和触发分支搜索
Browse files Browse the repository at this point in the history
1. 构建历史支持源材料和触发材料搜索
2. 触发分支和源材料分支支持下来搜索
使用服务内存搜索代替mysql搜索
  • Loading branch information
mingshewhe committed Aug 5, 2024
1 parent 628202e commit a41f1d0
Showing 1 changed file with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -518,8 +518,20 @@ class PipelineRuntimeService @Autowired constructor(
debugVersion = debugVersion,
type = type
)
history.filter { it.webhookInfo != null && !it.webhookInfo!!.webhookBranch.isNullOrBlank() }
.map { it.webhookInfo!!.webhookBranch!! }.distinct()
val webhookInfoList = history.filter { it.webhookInfo != null }.map { it.webhookInfo!! }
val aliasNames = if (!aliasList.isNullOrEmpty() && aliasList.first().isNotBlank()) {
aliasList
} else {
webhookInfoList.map { it.webhookAliasName }
}
val result = mutableListOf<String>()
aliasNames.distinct().forEach { alias ->
val branchNames = webhookInfoList.filter {
it.webhookAliasName == alias && !it.webhookBranch.isNullOrBlank()
}.map { it.webhookBranch!! }.distinct()
result.addAll(branchNames)
}
result.distinct()
}
else -> emptyList()
}
Expand Down

0 comments on commit a41f1d0

Please sign in to comment.