You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by kl...@apache.org on 2022/09/30 04:35:08 UTC

[incubator-devlake] branch main updated: fix: prefix param should move TransformationRules to DoraOptions (#3290)

This is an automated email from the ASF dual-hosted git repository.

klesh pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git


The following commit(s) were added to refs/heads/main by this push:
     new 6fd0425e fix: prefix param should move TransformationRules to DoraOptions (#3290)
6fd0425e is described below

commit 6fd0425e402ed0a6d7edeadf395146e7d5a4a30b
Author: abeizn <zi...@merico.dev>
AuthorDate: Fri Sep 30 12:35:04 2022 +0800

    fix: prefix param should move TransformationRules to DoraOptions (#3290)
    
    * fix: prefix param should move TransformationRules to DoraOptions
    
    * fix: prefix param should move TransformationRules to DoraOptions
---
 plugins/dora/e2e/env_enricher_test.go | 2 +-
 plugins/dora/tasks/task_data.go       | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/plugins/dora/e2e/env_enricher_test.go b/plugins/dora/e2e/env_enricher_test.go
index cc108162..d2aa98c9 100644
--- a/plugins/dora/e2e/env_enricher_test.go
+++ b/plugins/dora/e2e/env_enricher_test.go
@@ -61,11 +61,11 @@ func TestEnrichEnvDataFlow(t *testing.T) {
 	taskDataPrefix := &tasks.DoraTaskData{
 		Options: &tasks.DoraOptions{
 			TransformationRules: tasks.TransformationRules{
-				Prefix:            "jenkins",
 				ProductionPattern: "(?i)deploy",
 				StagingPattern:    "(?i)stag",
 				TestingPattern:    "(?i)test",
 			},
+			Prefix: "jenkins",
 		},
 	}
 	dataflowTester.Subtask(tasks.EnrichTaskEnvMeta, taskDataPrefix)
diff --git a/plugins/dora/tasks/task_data.go b/plugins/dora/tasks/task_data.go
index 978943a6..9345eaab 100644
--- a/plugins/dora/tasks/task_data.go
+++ b/plugins/dora/tasks/task_data.go
@@ -29,13 +29,13 @@ type TransformationRules struct {
 	ProductionPattern string `mapstructure:"productionPattern" json:"productionPattern"`
 	StagingPattern    string `mapstructure:"stagingPattern" json:"stagingPattern"`
 	TestingPattern    string `mapstructure:"testingPattern" json:"testingPattern"`
-	Prefix            string `mapstructure:"prefix" json:"prefix"`
 }
 
 type DoraOptions struct {
 	Tasks               []string `json:"tasks,omitempty"`
 	Since               string
 	RepoId              string `json:"repoId"`
+	Prefix              string `json:"prefix"`
 	TransformationRules `mapstructure:"transformationRules" json:"transformationRules"`
 }