From 78d288d4845dffae2e2d3414abd5b518a1bbfd79 Mon Sep 17 00:00:00 2001 From: KUAI Date: Mon, 5 Oct 2026 16:58:21 +0800 Subject: [PATCH 1/2] Update ai-issue-analysis.yml --- .github/workflows/ai-issue-analysis.yml | 37 ++++++++++++------------- 1 file changed, 17 insertions(+), 20 deletions(-) diff --git a/.github/workflows/ai-issue-analysis.yml b/.github/workflows/ai-issue-analysis.yml index da29beb5..2ee32125 100644 --- a/.github/workflows/ai-issue-analysis.yml +++ b/.github/workflows/ai-issue-analysis.yml @@ -2,7 +2,7 @@ name: AI Issue Analysis on: issues: - types: [opened, reopened] + types: [opened] issue_comment: types: [created] workflow_dispatch: @@ -13,52 +13,49 @@ on: type: number jobs: - copilot-analysis: + ai-analysis: if: | - (github.event_name == 'issues' && - (github.event.action == 'opened' || github.event.action == 'reopened')) || + (github.event_name == 'issues' && github.event.action == 'opened') || github.event_name == 'workflow_dispatch' || (github.event_name == 'issue_comment' && github.event.action == 'created' && - github.event.issue.pull_request == null && contains(github.event.comment.body, '@github-actions') && github.event.comment.user.type != 'Bot') runs-on: ubuntu-latest - concurrency: - group: ai-issue-analysis-${{ github.event.issue.number || github.event.inputs.issue_number || github.run_id }} - cancel-in-progress: true 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" + # --- 选择 agent(三选一:claude / codex / copilot)--- + agent: codex + + # --- 统一认证 --- + api-key: ${{ secrets.LUNAR_API_KEY }} + api-base-url: ${{ vars.LUNAR_BASE_URL }} + model: ${{ vars.LUNAR_MODEL }} + + # --- 通用配置 --- github-token: ${{ secrets.GITHUB_TOKEN }} - # 模型默认使用 gpt-5.3-codex;可通过仓库变量 COPILOT_MODEL 覆盖。 - copilot-model: ${{ vars.COPILOT_MODEL || 'gpt-5.3-codex' }} - # 推理强度可通过仓库变量 COPILOT_REASONING_EFFORT 覆盖(默认 high)。 - copilot-reasoning-effort: ${{ vars.COPILOT_REASONING_EFFORT || 'high' }} + bot-name: "@github-actions" + reasoning-effort: xhigh # 思考等级,默认 xhigh;Claude: --effort / Codex: model_reasoning_effort / Copilot: --reasoning-effort - - name: 查看完整输入输出 + - name: Show outputs if: always() 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 }} + AGENT_OUTPUT: ${{ steps.analysis.outputs.agent-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' "$AGENT_OUTPUT" printf '%s\n' "$FINAL_CONCLUSION" From 0ca0b714c22f0893dd7264d8b5d61db7fa306cd4 Mon Sep 17 00:00:00 2001 From: KUAI Date: Mon, 5 Oct 2026 17:04:56 +0800 Subject: [PATCH 2/2] Update ai-issue-analysis.yml --- .github/workflows/ai-issue-analysis.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ai-issue-analysis.yml b/.github/workflows/ai-issue-analysis.yml index 2ee32125..cbf1bac3 100644 --- a/.github/workflows/ai-issue-analysis.yml +++ b/.github/workflows/ai-issue-analysis.yml @@ -19,9 +19,13 @@ jobs: github.event_name == 'workflow_dispatch' || (github.event_name == 'issue_comment' && github.event.action == 'created' && + github.event.issue.pull_request == null && contains(github.event.comment.body, '@github-actions') && github.event.comment.user.type != 'Bot') runs-on: ubuntu-latest + concurrency: + group: ai-issue-analysis-${{ github.event.issue.number || github.event.inputs.issue_number || github.run_id }} + cancel-in-progress: true permissions: contents: read issues: write