-
Notifications
You must be signed in to change notification settings - Fork 2
57 lines (54 loc) · 2.08 KB
/
ai-issue-analysis.yml
File metadata and controls
57 lines (54 loc) · 2.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
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, '@github-actions') &&
github.event.comment.user.type != 'Bot')
runs-on: ubuntu-latest
permissions:
contents: read
issues: write
steps:
# 推荐配套:
# - .claude/skills/generic-issue-log-analysis/SKILL.md
- name: Analyze issue with AI
id: analysis
uses: Misteo/ai-issue-analysis@main
with:
# 请在 https://github.com/settings/personal-access-tokens 添加一个token,填写到仓库 secret 里(请确保你有 Copilot Pro)
copilot-github-token: ${{ secrets.COPILOT_GITHUB_TOKEN }}
bot-name: "@github-actions"
github-token: ${{ secrets.GITHUB_TOKEN }}
# 这里不建议换成免费模型,非常笨,不会调用工具,导致后续流程都不正常
copilot-model: gpt-5.4
copilot-reasoning-effort: xhigh
- 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"