d4x1 commented on code in PR #7366:
URL:
https://github.com/apache/incubator-devlake/pull/7366#discussion_r1580781898
##########
backend/helpers/pluginhelper/api/pipeline_plan.go:
##########
@@ -60,6 +62,17 @@ func MakePipelinePlanTask(
entities []string,
options interface{},
) (*models.PipelineTask, errors.Error) {
+ // enable subtasks by default if they are in the config env var
ENABLE_SUBTASKS_BY_DEFAULT
+ cfg := config.GetConfig()
+ enableSubtasksByDefault := cfg.GetString("ENABLE_SUBTASKS_BY_DEFAULT")
+ enableSubtasksList := strings.Split(enableSubtasksByDefault, ",")
+ for s := range subtaskMetas {
+ compareName := pluginName + ":" + subtaskMetas[s].Name
+ if stringInSlice(compareName, enableSubtasksList) {
+ subtaskMetas[s].EnabledByDefault = true
Review Comment:
I dislike the config in env.sample, but I have no better ideas.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]