Files
infiplot-web/.github/workflows/pr-agent.yml
T
yuanzonghao e39e9e1c86 chore(ci): disable PR Agent auto-describe and AI title
Collaborators' hand-written PR titles and descriptions were being
overwritten by the automatic /describe run. Disable auto_describe on the
Claude job and set generate_ai_title = false so human-authored metadata
is preserved. Manual /describe via PR comment still works.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-07 22:27:54 +08:00

90 lines
3.7 KiB
YAML

name: PR Agent
on:
pull_request:
types: [opened, reopened, ready_for_review, synchronize]
issue_comment:
types: [created]
jobs:
review-claude:
if: >
github.event.sender.type != 'Bot' &&
(
github.event_name == 'pull_request' ||
(github.event_name == 'issue_comment' &&
github.event.issue.pull_request &&
startsWith(github.event.comment.body, '/') &&
contains(fromJSON('["OWNER","MEMBER","COLLABORATOR"]'), github.event.comment.author_association))
)
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
contents: read
steps:
- name: PR Agent - Claude Opus 4.6
uses: the-pr-agent/pr-agent@main
env:
OPENAI.KEY: ${{ secrets.PR_REVIEW_API_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
config.model: "openai/claude-opus-4-6"
config.fallback_models: '["openai/claude-sonnet-4-6"]'
config.custom_model_max_tokens: 200000
config.reasoning_effort: "high"
openai.api_base: ${{ secrets.PR_REVIEW_BASE_URL }}
github_action_config.auto_review: "true"
github_action_config.auto_describe: "false"
github_action_config.auto_improve: "true"
github_action_config.pr_actions: '["opened", "reopened", "ready_for_review", "synchronize"]'
pr_reviewer.extra_instructions: |
在评审正文最顶部,单独一行以引用块格式输出:
> 🤖 Reviewed by **Claude Opus 4.6**
不要评论纯代码风格或格式问题。
pr_code_suggestions.extra_instructions: |
在建议表格上方,单独一行以引用块格式输出:
> 🤖 Suggested by **Claude Opus 4.6**
best_practices.md 已包含项目规则,请优先围绕规则违反给出建议。
pr_description.extra_instructions: |
在描述顶部以引用块单独一行输出:
> 🤖 Described by **Claude Opus 4.6**
review-gpt:
if: >
github.event.sender.type != 'Bot' &&
(
github.event_name == 'pull_request' ||
(github.event_name == 'issue_comment' &&
github.event.issue.pull_request &&
startsWith(github.event.comment.body, '/') &&
contains(fromJSON('["OWNER","MEMBER","COLLABORATOR"]'), github.event.comment.author_association))
)
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
contents: read
steps:
- name: PR Agent - GPT 5.5
uses: the-pr-agent/pr-agent@main
env:
OPENAI.KEY: ${{ secrets.PR_REVIEW_API_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
config.model: "openai/gpt-5.5"
config.fallback_models: '["openai/gpt-5.4-mini"]'
config.custom_model_max_tokens: 200000
config.reasoning_effort: "high"
openai.api_base: ${{ secrets.PR_REVIEW_BASE_URL }}
github_action_config.auto_review: "true"
github_action_config.auto_describe: "false"
github_action_config.auto_improve: "true"
github_action_config.pr_actions: '["opened", "reopened", "ready_for_review", "synchronize"]'
pr_reviewer.extra_instructions: |
在评审正文最顶部,单独一行以引用块格式输出:
> 🤖 Reviewed by **GPT 5.5**
不要评论纯代码风格或格式问题。
pr_code_suggestions.extra_instructions: |
在建议表格上方,单独一行以引用块格式输出:
> 🤖 Suggested by **GPT 5.5**
best_practices.md 已包含项目规则,请优先围绕规则违反给出建议。