From fbbc21dce99f6ed6e361dd0ccd42221d5200d914 Mon Sep 17 00:00:00 2001 From: yangwei9999 <348134071@qq.com> Date: Tue, 21 May 2024 01:45:52 +0000 Subject: [PATCH 1/2] update cve-vulner-manager/taskhandler/common.go. Signed-off-by: yangwei9999 <348134071@qq.com> --- cve-vulner-manager/taskhandler/common.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cve-vulner-manager/taskhandler/common.go b/cve-vulner-manager/taskhandler/common.go index 3de5838..b6ea108 100644 --- a/cve-vulner-manager/taskhandler/common.go +++ b/cve-vulner-manager/taskhandler/common.go @@ -1060,8 +1060,8 @@ func CreateIssueBody(accessToken, owner, path, assignee string, issue := IssueOptions{Token: accessToken, Repo: path, Title: cve.CveNum, IssueType: issueType, Body: body, Assignee: assignee, Labels: labels, SecurityHole: false} if cve.OrganizationID == util.MindSpore { issue.Program = "67813" - if assignee != "fangzhou0329" { - issue.Collaborators = "fangzhou0329" + if assignee != "rainyhorse" { + issue.Collaborators = "rainyhorse" } if mile != 0 { issue.Milestone = int64(mile) -- Gitee From 26355b280369c36ea6fe2925f7ba9872956f9838 Mon Sep 17 00:00:00 2001 From: yangwei999 <348134071@qq.com> Date: Wed, 22 May 2024 14:20:58 +0800 Subject: [PATCH 2/2] put assignee to config --- cve-vulner-manager/conf/product_app.conf | 1 + cve-vulner-manager/taskhandler/common.go | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/cve-vulner-manager/conf/product_app.conf b/cve-vulner-manager/conf/product_app.conf index 3c1be3c..9cad521 100644 --- a/cve-vulner-manager/conf/product_app.conf +++ b/cve-vulner-manager/conf/product_app.conf @@ -258,6 +258,7 @@ mindspore_owner = mindspore # git token git_mindspore_token = "${GITEE_MINDSPORE_TOKEN||xxx}" mindspore_version = "master,r1.10,r1.9,r2.0,r2.1,r2.2,r2.3" +assignee = rainyhorse [obs] access_key_id = "${OBS_KEY_ID||xxx}" diff --git a/cve-vulner-manager/taskhandler/common.go b/cve-vulner-manager/taskhandler/common.go index b6ea108..4d197b7 100644 --- a/cve-vulner-manager/taskhandler/common.go +++ b/cve-vulner-manager/taskhandler/common.go @@ -1059,9 +1059,11 @@ func CreateIssueBody(accessToken, owner, path, assignee string, issue := IssueOptions{Token: accessToken, Repo: path, Title: cve.CveNum, IssueType: issueType, Body: body, Assignee: assignee, Labels: labels, SecurityHole: false} if cve.OrganizationID == util.MindSpore { + mindsporeAssignee := beego.AppConfig.String("mindspore::assignee") + issue.Program = "67813" - if assignee != "rainyhorse" { - issue.Collaborators = "rainyhorse" + if assignee != mindsporeAssignee { + issue.Collaborators = mindsporeAssignee } if mile != 0 { issue.Milestone = int64(mile) -- Gitee