From 8addc17ccc940d92d8b67b2f41e2e98c2f8ef8ee Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 13 Mar 2026 12:52:28 +0000 Subject: [PATCH] fix: exclude SYSLOG issues from zhuyuan-issue-reply + add title/body detection to syslog-issue-pipeline MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Problem: When developers submit SYSLOG via the 🚀 开发者入口, zhuyuan-issue-reply.yml intercepts the issue and responds with "已记录。霜砚会在下次巡检时处理" instead of letting syslog-issue-pipeline.yml handle the full auto-processing loop. Root causes: 1. zhuyuan-issue-reply.yml triggers on ALL new issues with no exclusion for SYSLOG 2. syslog-issue-pipeline.yml only detects via 'syslog' label which may not exist in repo 3. zhuyuan-issue-reply.js has no guard against SYSLOG issues, falls through to generic fallback Fixes: - zhuyuan-issue-reply.yml: Exclude issues with syslog/bingshuo-deploy labels, SYSLOG/系统日志 in title, or '### 广播编号' in body (template field marker) - syslog-issue-pipeline.yml: Detect SYSLOG issues by label OR title OR body pattern - zhuyuan-issue-reply.js: Add isSyslog guard in handleIssueTrigger() as defense-in-depth Co-authored-by: qinfendebingshuo <207279273+qinfendebingshuo@users.noreply.github.com> --- .github/workflows/syslog-issue-pipeline.yml | 7 ++++++- .github/workflows/zhuyuan-issue-reply.yml | 8 +++++++- scripts/zhuyuan-issue-reply.js | 7 +++++++ 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/.github/workflows/syslog-issue-pipeline.yml b/.github/workflows/syslog-issue-pipeline.yml index 27ac9cfc..996977e7 100644 --- a/.github/workflows/syslog-issue-pipeline.yml +++ b/.github/workflows/syslog-issue-pipeline.yml @@ -34,7 +34,12 @@ jobs: process: name: 📡 处理 SYSLOG 提交 / 广播提问 (Issue) runs-on: ubuntu-latest - if: contains(toJSON(github.event.issue.labels), 'syslog') + # 检测 SYSLOG 提交:通过标签、标题或正文模板字段识别 + if: > + contains(toJSON(github.event.issue.labels), 'syslog') || + contains(github.event.issue.title, 'SYSLOG') || + contains(github.event.issue.title, '系统日志') || + contains(github.event.issue.body, '### 广播编号') permissions: contents: write issues: write diff --git a/.github/workflows/zhuyuan-issue-reply.yml b/.github/workflows/zhuyuan-issue-reply.yml index 6b713545..218393aa 100644 --- a/.github/workflows/zhuyuan-issue-reply.yml +++ b/.github/workflows/zhuyuan-issue-reply.yml @@ -11,8 +11,14 @@ jobs: name: 🤖 铸渊回答问题 runs-on: ubuntu-latest # 仅在 Issue 新建或评论中包含 @铸渊 / 铸渊 时触发 + # 排除 SYSLOG 提交(由 syslog-issue-pipeline.yml 处理)和 bingshuo-deploy(由 bingshuo-deploy-agent.yml 处理) if: > - github.event_name == 'issues' || + (github.event_name == 'issues' && + !contains(join(github.event.issue.labels.*.name, ','), 'syslog') && + !contains(join(github.event.issue.labels.*.name, ','), 'bingshuo-deploy') && + !contains(github.event.issue.title, 'SYSLOG') && + !contains(github.event.issue.title, '系统日志') && + !contains(github.event.issue.body, '### 广播编号')) || (github.event_name == 'issue_comment' && contains(github.event.comment.body, '铸渊')) permissions: diff --git a/scripts/zhuyuan-issue-reply.js b/scripts/zhuyuan-issue-reply.js index 0841d074..68089494 100644 --- a/scripts/zhuyuan-issue-reply.js +++ b/scripts/zhuyuan-issue-reply.js @@ -103,6 +103,7 @@ function containsSystemCommand(text) { } // === 判断Issue类型 === +const isSyslog = issueLabels.includes('syslog') || /SYSLOG|系统日志/.test(issueTitle) || issueBody.includes('### 广播编号'); const isProgressQuery = issueLabels.includes('progress-query'); const isDevQuestion = issueLabels.includes('dev-question'); @@ -290,6 +291,12 @@ async function handleCollaboratorComment(user) { async function handleIssueTrigger() { let reply = ''; + // --- SYSLOG 提交:由 syslog-issue-pipeline 处理,此处跳过 --- + if (isSyslog) { + console.log('📡 SYSLOG Issue detected, skipping (handled by syslog-issue-pipeline)'); + return; + } + // --- 进度查询(指定开发者)--- if (isProgressQuery && devInfo) { reply = `## ⚒️ 铸渊回复 · 进度查询\n\n`;