Skip to content

feat(assistant): 项目助手代理配置与社区维护工具流 - #23

Merged
Windsander merged 2 commits into
mainfrom
feat/assistant-agent-config
Aug 29, 2026
Merged

Windsander merged 2 commits into
mainfrom
feat/assistant-agent-config

Conversation

@Windsander

Copy link
Copy Markdown
Owner

概述

为仓库引入一套基于 GitHub 原生能力(零额外 token 消耗)的社区维护工具流:

  • Issue 表单(5 个 YAML 模板 + config.yml):Bug / Feature / 模型支持 / Webbridge / 技术问题,关闭空白 Issue 并引导至 Discussions
  • Issue 自动分类器:关键词命中 type/*、area/* 标签;标签缺失时降级为 warning
  • 周报生成:每周六 9:00(北京时间)汇总 Issues / PRs / Discussions 到季度 Discussion 帖(GraphQL API,自动选分类)
  • Copilot 仓库级指令:copilot-instructions.md 提供项目上下文
  • Label 管理:scripts/github-labels.json + import-labels.sh 幂等导入 14 个标签

详细说明见 .github/README.md。

合并后需要的人工操作

  1. Settings → General 开启 Discussions
  2. 运行 bash scripts/import-labels.sh 导入标签(需 gh CLI),或按文档手动创建
  3. 在 Actions 页手动触发一次「周报生成」做冒烟验证

变更清单

  • .github/ISSUE_TEMPLATE/:4 个旧 Markdown 模板 → YAML 表单,新增 config.yml
  • .github/workflows/weekly-report.yml:重写为 GraphQL 实现,修正统计口径与权限键
  • .github/workflows/issue-classifier.yml:修复关键词乱码,增强容错
  • .github/copilot-instructions.md:重命名为 GitHub 约定的标准文件名
  • scripts/:新增标签定义与导入脚本

- 添加 Issue 模板(bug、model-support、webbridge、question)
- 添加 Copilot 提示词 (COPILOT_INSTRUCTIONS.md)
- 添加 Issue 自动分类 workflow
- 添加周报 workflow (Discussions 季度汇总)
- weekly-report: 改用 GraphQL API 读写 Discussions(REST 不存在对应端点),
  自动选择 discussion 分类,移除硬编码 category_id;
  修正 PR 统计(pulls.list 不支持 since,按 merged_at 过滤)、
  Issue 统计排除 PR 并按 created_at 精确过滤;改用 ISO-8601 周数;
  修正权限键 pulls -> pull-requests;增加并发保护
- issue-classifier: 修复乱码关键词 '?'';标签缺失时降级为 warning
  而非失败;跳过表单模板已携带的标签
- ISSUE_TEMPLATE: 新增 config.yml(关闭空白 Issue、引导至 Discussions);
  bug_report / feature_request 标签统一为 type/* 口径,与分类器和周报对齐
- copilot-instructions: 重命名为 GitHub 约定的标准文件名(旧名不生效)
- import-labels.sh: 检查 jq 依赖;gh label create --force 幂等导入;
  仓库名支持参数传入或从 git remote 自动解析
- .github/README.md: 同步上述变更,补充 Discussions GraphQL 注意事项
@Windsander
Windsander merged commit 08dcf9e into main Aug 29, 2026
67 checks passed
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.

1 participant