fix: exclude SYSLOG issues from zhuyuan-issue-reply + add title/body detection to syslog-issue-pipeline

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>
This commit is contained in:
copilot-swe-agent[bot] 2026-03-13 12:52:28 +00:00
parent 541281d1f1
commit 8addc17ccc
3 changed files with 20 additions and 2 deletions

View File

@ -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

View File

@ -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:

View File

@ -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`;