Files
file-online-preview/.github/workflows/copilot-issue-auto-comment.yml
kl 7f16243270 chore(github): add accelerated support notice for urgent issues (#712)
* chore(github): add support acceleration notice to issue templates and auto-comments

* chore(actions): make copilot auto-comment bilingual and single-message
2026-03-03 19:28:23 +08:00

35 lines
1.6 KiB
Java
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
name: Copilot Issue Auto Comment
on:
issues:
types: [opened]
workflow_dispatch:
permissions:
issues: write
jobs:
copilot_auto_comment:
runs-on: ubuntu-latest
steps:
- name: Ask Copilot to triage issue automatically
uses: actions/github-script@v7
with:
script: |
const issue = context.payload.issue;
if (!issue) return;
const owner = context.repo.owner;
const repo = context.repo.repo;
const body = `@copilot 请自动分诊并直接给出可执行建议无需人工先介入\n\n- 先判断类型Bug / Performance / Security / Question / Feature\n- 检查 Issue 信息是否完整版本部署方式复现步骤日志\n- 若信息不完整请直接按模板列出缺失项并引导补充\n- 若信息较完整请给出下一步排查建议与最小复现建议\n- 若判断为已知问题或已修复请给出对应版本/修复方向\n\nIssue #${issue.number}\n标题${issue.title}\n链接${issue.html_url}\n\n---\n\n补充说明 / Support Notice:\n- GitHub Issues 会持续跟进处理 / We will continue to follow up through GitHub Issues.\n- 如为线上紧急问题可通过知识星球渠道加速处理 / For urgent production issues, you can use our Knowledge Planet channel for faster processing:\n https://wx.zsxq.com/group/48844125114258`;
await github.rest.issues.createComment({
owner,
repo,
issue_number: issue.number,
body,
});
core.info(`Copilot prompt comment posted to #${issue.number}`);