Skip to content

feat(ci): auto process issues - #3060

Draft
PIKACHUIM wants to merge 1 commit into
mainfrom
ci/auto-issue-process
Draft

feat(ci): auto process issues#3060
PIKACHUIM wants to merge 1 commit into
mainfrom
ci/auto-issue-process

Conversation

@PIKACHUIM

Copy link
Copy Markdown
Member

Summary / 摘要

为 OpenList 增加基于 LLM 的 Issue 自动分诊(Triage)能力。当用户提交 Issue(或评论、重新打开)时,GitHub Action 自动触发,调用自定义 LLM API 对 Issue 进行相关性判断、垃圾信息识别、重复检测、类型分类、信息完整性校验、问题有效性判断与静态分析结论输出,并按结构化决策自动执行「改标题前缀 / 打标签 / 评论 / 关闭 / 锁定 / 关联」等操作。此举旨在降低维护者的人工 Issue 分诊负担,提升反馈处理效率。

  • 行为变化(用户可感知)
    • Issue 创建/编辑/重新打开、评论创建后,会收到来自机器人的自动分诊响应(分类、追问、关闭或关联提示)。
  • 实现变化
    • 新增 .github/workflows/issue-triage.yml:监听 issuesopened/edited/reopened)与 issue_commentcreated)事件,忽略由 PR 转换而来的 Issue,运行 Python 脚本。
    • 新增 .github/issue-triage/system-prompt.md:完整分诊系统提示词,含决策树、分类标签规范、话术模板、约束边界,以及「输出协议」(要求模型只输出可执行的 JSON 决策)。
    • 新增 .github/issue-triage/triage.py:纯标准库实现,读取事件与系统提示词 → 调用 OpenAI 兼容 /chat/completions 接口 → 鲁棒解析 JSON → 通过 gh CLI 执行操作。
  • 配置变化:新增 3 个需在仓库 Secrets 中配置的变量(见下)。
  • 兼容性:不影响现有 Issue 模板、issue_pr_comment.yml 及任何应用代码;仅在新增 workflow 文件中生效。

需要配置的 Secrets(缺一不可)

Secret 说明
CUSTOM_API_BASE_URL 自定义 LLM API 基础地址(OpenAI 兼容,如 https://api.deepseek.com/v1
CUSTOM_API_KEY 自定义 API Key
CUSTOM_API_MODEL 模型名(如 deepseek-chat / gpt-4o-mini
  • This PR has breaking changes.
    / 此 PR 包含破坏性变更。
  • This PR changes public API, config, storage format, or migration behavior.
    / 此 PR 修改了公开 API、配置、存储格式或迁移行为。
  • This PR requires corresponding changes in related repositories.
    / 此 PR 需要关联仓库同步修改。

Related repository PRs / 关联仓库 PR:

  • 无(本 PR 仅涉及当前仓库的 CI/自动化配置)。

Related Issues / 关联 Issue

不适用 / Not applicable.

Testing / 测试

  • python -m py_compile .github/issue-triage/triage.py(语法检查通过,无第三方依赖)
  • YAML 语法检查(workflow 文件)通过
  • API 连通性验证(curl 调用 /chat/completions
  • Manual test / 手动测试(建议在 fork 或测试仓库执行,避免误操作主仓库):
    • 本地构造事件 JSON + 设置环境变量后运行 triage.py,确认 LLM 决策 JSON 解析正常
    • 配置 3 个 Secrets 后,在测试仓库创建 Issue,观察 ActionsIssue Triage (LLM) 日志
    • 验证各类决策:无关 Issue → 关闭;垃圾信息 → 关闭+锁定;重复 → 标记并关联;信息不足 → 追问;有效问题 → 输出分析结论
    • 建议先以「只打印决策、不执行写操作」的 dry-run 方式验证判断逻辑

Checklist / 检查清单

  • I have read CONTRIBUTING.
    / 我已阅读 CONTRIBUTING
  • I confirm this contribution follows the repository license, contribution policy, and code of conduct.
    / 我确认此贡献符合仓库许可证、贡献规范和行为准则。
  • I have formatted the changed code where applicable.
    / 我已按适用情况格式化变更代码。
  • I have requested review from relevant maintainers or code owners where applicable.
    / 我已在适用情况下请求相关维护者或代码所有者审查。

AI Disclosure / AI 使用声明

  • This PR includes AI-assisted content.
    / 此 PR 包含 AI 辅助内容。

Tools used / 使用工具:

  • ChatGPT
  • Codex
  • GitHub Copilot
  • Claude
  • Gemini
  • Other (please specify) / 其他(请注明): Deepseek-V4-Pro (CodeBuddy)

Usage scope / 使用范围:

  • Code generation / 代码生成

  • Refactoring / 重构

  • Documentation / 文档

  • Tests / 测试

  • Translation / 翻译

  • Review assistance / 审查辅助

  • I have reviewed and validated all AI-assisted content included in this PR.
    / 我已审核并验证此 PR 中的所有 AI 辅助内容。

  • I have ensured that all AI-assisted commits include Co-Authored-By attribution.
    / 我已确保所有 AI 辅助提交都包含 Co-Authored-By 归属信息。

  • I can reproduce all AI-assisted content included in this PR without any AI tools.
    / 我可以在没有任何 AI 工具的情况下重现此 PR 中包含的所有 AI 辅助内容。

@jyxjjj
jyxjjj marked this pull request as draft September 8, 2026 08:03
@jyxjjj

jyxjjj commented Sep 8, 2026

Copy link
Copy Markdown
Member

标记一下暂不合并 等我空了看

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants