From 22f9452d98487f7474f2d8be721c7be0fbd29047 Mon Sep 17 00:00:00 2001 From: zhangliang Date: Fri, 18 Aug 2023 10:01:26 +0800 Subject: [PATCH] fix: zentao parse JSON error --- backend/plugins/zentao/models/bug_commits.go | 13 ++----------- backend/plugins/zentao/models/story_commits.go | 13 ++----------- backend/plugins/zentao/models/task_commits.go | 13 ++----------- 3 files changed, 6 insertions(+), 33 deletions(-) diff --git a/backend/plugins/zentao/models/bug_commits.go b/backend/plugins/zentao/models/bug_commits.go index ce78cfde401..905fcb2b400 100644 --- a/backend/plugins/zentao/models/bug_commits.go +++ b/backend/plugins/zentao/models/bug_commits.go @@ -112,17 +112,8 @@ type ZentaoBugRepoCommitsRes struct { GitService string `json:"gitService"` Project string `json:"project"` } `json:"repo"` - Path string `json:"path"` - Type string `json:"type"` - Changes struct { - TestYaml struct { - Action string `json:"action"` - Kind string `json:"kind"` - OldPath string `json:"oldPath"` - View string `json:"view"` - Diff string `json:"diff"` - } `json:"/test.yaml"` - } `json:"changes"` + Path string `json:"path"` + Type string `json:"type"` RepoID string `json:"repoID"` BranchID bool `json:"branchID"` ObjectID string `json:"objectID"` diff --git a/backend/plugins/zentao/models/story_commits.go b/backend/plugins/zentao/models/story_commits.go index 9377381490d..b49828d15f7 100644 --- a/backend/plugins/zentao/models/story_commits.go +++ b/backend/plugins/zentao/models/story_commits.go @@ -112,17 +112,8 @@ type ZentaoStoryRepoCommitsRes struct { GitService string `json:"gitService"` Project string `json:"project"` } `json:"repo"` - Path string `json:"path"` - Type string `json:"type"` - Changes struct { - TestYaml struct { - Action string `json:"action"` - Kind string `json:"kind"` - OldPath string `json:"oldPath"` - View string `json:"view"` - Diff string `json:"diff"` - } `json:"/test.yaml"` - } `json:"changes"` + Path string `json:"path"` + Type string `json:"type"` RepoID string `json:"repoID"` BranchID bool `json:"branchID"` ObjectID string `json:"objectID"` diff --git a/backend/plugins/zentao/models/task_commits.go b/backend/plugins/zentao/models/task_commits.go index f297358b555..2b396b8cf93 100644 --- a/backend/plugins/zentao/models/task_commits.go +++ b/backend/plugins/zentao/models/task_commits.go @@ -112,17 +112,8 @@ type ZentaoTaskRepoCommitsRes struct { GitService string `json:"gitService"` Project string `json:"project"` } `json:"repo"` - Path string `json:"path"` - Type string `json:"type"` - Changes struct { - TestYaml struct { - Action string `json:"action"` - Kind string `json:"kind"` - OldPath string `json:"oldPath"` - View string `json:"view"` - Diff string `json:"diff"` - } `json:"/test.yaml"` - } `json:"changes"` + Path string `json:"path"` + Type string `json:"type"` RepoID string `json:"repoID"` BranchID bool `json:"branchID"` ObjectID string `json:"objectID"`