Files
MaaAssistantArknights/.github/workflows/issue-ai-analysis.yml
2026-03-18 01:51:59 +08:00

65 lines
2.5 KiB
YAML
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: AI Issue Analysis
on:
issues:
types: [opened]
issue_comment:
types: [created]
workflow_dispatch:
inputs:
issue_number:
description: 'Issue number to analyze'
required: true
type: number
jobs:
copilot-analysis:
if: |
(github.event_name == 'issues' && github.event.action == 'opened') ||
github.event_name == 'workflow_dispatch' ||
(github.event_name == 'issue_comment' &&
github.event.action == 'created' &&
contains(github.event.comment.body, '@MaaArknightsBot') &&
github.event.comment.user.type != 'Bot')
runs-on: ubuntu-latest
permissions:
contents: read
issues: write
steps:
# 这个 action 只负责编排,分析质量仍依赖配套的 issue/log analysis skill。
# 详细使用文档https://github.com/MistEO/ai-issue-analysis
# 最佳实践参考:
# - https://github.com/MaaEnd/MaaEnd/blob/v2/.claude/skills/maaend-issue-log-analysis/SKILL.md
# - https://github.com/MaaAssistantArknights/MaaAssistantArknights/blob/dev-v2/.claude/skills/maa-issue-log-analysis/SKILL.md
- name: Analyze issue with AI
id: analysis
uses: Misteo/ai-issue-analysis@main
with:
github-token: ${{ secrets.MAA_BOT_TOKEN }}
copilot-github-token: ${{ secrets.COPILOT_GITHUB_TOKEN }}
bot-name: '@MaaArknightsBot'
initial-comment-body: |
🤖 **MaaBot 正在分析该 Issue...**
不需畏惧,我们会战胜那些鲁莽的家伙!
对此事的分析已然展开,预计约需 10 分钟。
再转身回头的时候,我们将带着胜利归来。
prompt-template: |
分析 GitHub Issue {{issue_number}}。把最终结论用“帕拉斯风格”写到 {{copilot_answer_file}}。
- name: Consume outputs
env:
ANALYSIS_PROMPT: ${{ steps.analysis.outputs.analysis-prompt }}
ISSUE_NUMBER: ${{ steps.analysis.outputs.issue-number }}
COMMENT_ID: ${{ steps.analysis.outputs.comment-id }}
COMMENT_URL: ${{ steps.analysis.outputs.comment-url }}
COPILOT_OUTPUT: ${{ steps.analysis.outputs.copilot-output }}
FINAL_CONCLUSION: ${{ steps.analysis.outputs.final-conclusion }}
run: |
printf '%s\n' "$ANALYSIS_PROMPT"
echo "issue_number=$ISSUE_NUMBER"
echo "comment_id=$COMMENT_ID"
echo "comment_url=$COMMENT_URL"
printf '%s\n' "$COPILOT_OUTPUT"
printf '%s\n' "$FINAL_CONCLUSION"