From 23687fabb540dc3768c75bbe67dd81d54585a978 Mon Sep 17 00:00:00 2001 From: showlotus <2257030399@qq.com> Date: Wed, 12 Aug 2026 08:50:13 +0800 Subject: [PATCH 1/3] test: add formatDate util for AI code review test Co-Authored-By: Claude --- plugin/index.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/plugin/index.js b/plugin/index.js index 24ad39c..dd01294 100644 --- a/plugin/index.js +++ b/plugin/index.js @@ -24,6 +24,16 @@ const timestamp = () => { return `[${d.getFullYear()}/${p(d.getMonth() + 1)}/${p(d.getDate())} ${p(d.getHours())}:${p(d.getMinutes())}:${p(d.getSeconds())}]` } +/** + * 格式化日期为可读字符串 + * @param {Date} date - 待格式化的日期对象 + * @returns {string} 格式化后的日期字符串,如 "2024-01-15" + */ +const formatDate = (date) => { + const p = (n) => String(n).padStart(2, '0') + return `${date.getFullYear()}-${p(date.getMonth() + 1)}-${p(date.getDate())}` +} + // OpenCode plugin that records skill invocations from two sources: // 1. tool.execute.before — agent-initiated skill tool calls (call_type: "auto") // 2. command.execute.before — user slash-command invocations (call_type: "manual") From bb6b1d49580f21d045d0ef51c1ed49b4df819ef1 Mon Sep 17 00:00:00 2001 From: showlotus <2257030399@qq.com> Date: Wed, 12 Aug 2026 09:04:13 +0800 Subject: [PATCH 2/3] feat: update model parameter for DeepSeek code review --- .github/workflows/ai-code-review.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ai-code-review.yml b/.github/workflows/ai-code-review.yml index 6c057f6..f8edab5 100644 --- a/.github/workflows/ai-code-review.yml +++ b/.github/workflows/ai-code-review.yml @@ -17,4 +17,5 @@ jobs: uses: hustcer/deepseek-review@v1 with: chat-token: ${{ secrets.CHAT_TOKEN }} + model: 'deepseek-v4-flash' sys-prompt: "You are a professional code review assistant for an OpenCode plugin project (Node.js ESM, pnpm). Analyze GitHub Pull Request code changes and identify potential code style issues, logic errors, security vulnerabilities, and provide improvement suggestions. List problems and recommendations in a concise and clear manner." From 2c06abcfdf4fa3f66dc4d793bbdb2dd0a667d86a Mon Sep 17 00:00:00 2001 From: showlotus <2257030399@qq.com> Date: Wed, 12 Aug 2026 09:09:35 +0800 Subject: [PATCH 3/3] feat: add issue comment trigger and enhance DeepSeek configuration --- .github/workflows/ai-code-review.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ai-code-review.yml b/.github/workflows/ai-code-review.yml index f8edab5..e5f41c7 100644 --- a/.github/workflows/ai-code-review.yml +++ b/.github/workflows/ai-code-review.yml @@ -3,6 +3,8 @@ name: AI Code Review on: pull_request_target: types: [opened, reopened, synchronize] + issue_comment: + types: [created] permissions: pull-requests: write @@ -18,4 +20,6 @@ jobs: with: chat-token: ${{ secrets.CHAT_TOKEN }} model: 'deepseek-v4-flash' + watch-mention: '@github-actions' + allowed-associations: 'OWNER,MEMBER,COLLABORATOR' sys-prompt: "You are a professional code review assistant for an OpenCode plugin project (Node.js ESM, pnpm). Analyze GitHub Pull Request code changes and identify potential code style issues, logic errors, security vulnerabilities, and provide improvement suggestions. List problems and recommendations in a concise and clear manner."