Skip to content

ci: add phase2 to CI branch triggers #28

ci: add phase2 to CI branch triggers

ci: add phase2 to CI branch triggers #28

Workflow file for this run

name: PR-Agent
on:
pull_request_target:
types: [opened, reopened, ready_for_review, synchronize]
pull_request_review_comment:
types: [created]
issue_comment:
types: [created]
permissions:
issues: write
pull-requests: write
contents: read
jobs:
pr_agent:
# Gate by actor identity to avoid leaking secrets on fork PRs:
# - pull_request[_target] events: the PR author must be a trusted role
# (OWNER / MEMBER / COLLABORATOR) → auto-runs describe + review on
# every push (`synchronize`).
# - issue_comment / pull_request_review_comment: the commenter must be
# a trusted role → lets designated reviewers manually re-trigger via
# PR-Agent slash commands (e.g. `/review`, `/improve`).
if: >
github.event.sender.type != 'Bot' &&
(
(
(github.event_name == 'pull_request' || github.event_name == 'pull_request_target') &&
(github.event.pull_request.author_association == 'OWNER' ||
github.event.pull_request.author_association == 'MEMBER' ||
github.event.pull_request.author_association == 'COLLABORATOR')
) ||
(
(github.event_name == 'issue_comment' || github.event_name == 'pull_request_review_comment') &&
(github.event.comment.author_association == 'OWNER' ||
github.event.comment.author_association == 'MEMBER' ||
github.event.comment.author_association == 'COLLABORATOR')
)
)
runs-on: ubuntu-latest
name: Run PR-Agent
steps:
- name: PR-Agent
uses: Codium-ai/pr-agent@main
env:
OPENAI_KEY: ${{ secrets.api_key }}
OPENAI_API_BASE: https://ark.cn-beijing.volces.com/api/coding/v3
CONFIG__AI_PROVIDER: openai
CONFIG__MODEL: openai/MiniMax-M2.5
CONFIG__MODEL_WEAK: openai/MiniMax-M2.5
CONFIG__FALLBACK_MODELS: openai/MiniMax-M2.5
CONFIG__CUSTOM_MODEL_MAX_TOKENS: "128000"
GITHUB_ACTION_CONFIG__AUTO_DESCRIBE: "true"
GITHUB_ACTION_CONFIG__AUTO_REVIEW: "true"
GITHUB_ACTION_CONFIG__AUTO_IMPROVE: "true"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}