From e45d817ef249bf574a761dda75a20aec64ca77e3 Mon Sep 17 00:00:00 2001 From: zhangjianjun_code <7844966+zhangjianjun_code@user.noreply.gitee.com> Date: Mon, 8 Feb 2021 16:09:59 +0800 Subject: [PATCH 1/3] Add log location problem --- controllers/hook.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/controllers/hook.go b/controllers/hook.go index 1554bb2..b365883 100644 --- a/controllers/hook.go +++ b/controllers/hook.go @@ -133,9 +133,13 @@ func (c *HookEventControllers) handleNoteDate() { return } hookPwd := beego.AppConfig.String("hook::hookpwd") + logs.Info("hookNote.Password: ", hookNote.Password, ", hookPwd: ", hookPwd) hookNote.Password = util.TrimString(hookNote.Password) + hookPwd = util.TrimString(hookPwd) + logs.Info("hookNote.Password: ", hookNote.Password, ", hookPwd: ", hookPwd, + ",hookNote.Action: ", hookNote.Action, ",hookNote.NoteableType", hookNote.NoteableType) if hookNote.Action == "comment" && hookNote.NoteableType == "Issue" && hookNote.Password == hookPwd { - //logs.Info(string(c.Ctx.Input.RequestBody)) + logs.Info(string(c.Ctx.Input.RequestBody)) //handle issue comment go handleIssueComment(hookNote) } -- Gitee From a5b0acc77a7aa05d7ff5a6e914ff9f1121c0eac2 Mon Sep 17 00:00:00 2001 From: zhangjianjun_code <7844966+zhangjianjun_code@user.noreply.gitee.com> Date: Mon, 8 Feb 2021 16:30:14 +0800 Subject: [PATCH 2/3] Add log location problem --- conf/product_app.conf | 3 ++- controllers/hook.go | 3 --- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/conf/product_app.conf b/conf/product_app.conf index 588397f..94e9358 100644 --- a/conf/product_app.conf +++ b/conf/product_app.conf @@ -102,7 +102,8 @@ owner_openuler= openeuler [hook] -hookpwd = "${HOOK_PWD||***}" +#hookpwd = "${HOOK_PWD||***}" +hookpwd = YpYGtwO0Wiv3mQFy9GIMOq1clP28l0uzhyv8Fiwrm7Ly hookurl = https://api.openeuler.org/cve-manager/v1/issue/hook/event hook_timeout = 600 # 1 create, 2 Not create diff --git a/controllers/hook.go b/controllers/hook.go index b365883..2fb29c4 100644 --- a/controllers/hook.go +++ b/controllers/hook.go @@ -133,11 +133,8 @@ func (c *HookEventControllers) handleNoteDate() { return } hookPwd := beego.AppConfig.String("hook::hookpwd") - logs.Info("hookNote.Password: ", hookNote.Password, ", hookPwd: ", hookPwd) hookNote.Password = util.TrimString(hookNote.Password) hookPwd = util.TrimString(hookPwd) - logs.Info("hookNote.Password: ", hookNote.Password, ", hookPwd: ", hookPwd, - ",hookNote.Action: ", hookNote.Action, ",hookNote.NoteableType", hookNote.NoteableType) if hookNote.Action == "comment" && hookNote.NoteableType == "Issue" && hookNote.Password == hookPwd { logs.Info(string(c.Ctx.Input.RequestBody)) //handle issue comment -- Gitee From 7362fddd88c8df264b4266d4386d78679420133f Mon Sep 17 00:00:00 2001 From: zhangjianjun_code <7844966+zhangjianjun_code@user.noreply.gitee.com> Date: Mon, 8 Feb 2021 16:56:44 +0800 Subject: [PATCH 3/3] done --- conf/product_app.conf | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/conf/product_app.conf b/conf/product_app.conf index 94e9358..588397f 100644 --- a/conf/product_app.conf +++ b/conf/product_app.conf @@ -102,8 +102,7 @@ owner_openuler= openeuler [hook] -#hookpwd = "${HOOK_PWD||***}" -hookpwd = YpYGtwO0Wiv3mQFy9GIMOq1clP28l0uzhyv8Fiwrm7Ly +hookpwd = "${HOOK_PWD||***}" hookurl = https://api.openeuler.org/cve-manager/v1/issue/hook/event hook_timeout = 600 # 1 create, 2 Not create -- Gitee