Skip to content

Commit 7fb4bde

Browse files
authored
Support PR Agent (#2297)
Signed-off-by: letonghan <[email protected]>
1 parent a9bdec7 commit 7fb4bde

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

.github/workflows/pr-agent.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Copyright (C) 2025 Intel Corporation
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
name: PR Agent
5+
6+
on:
7+
pull_request:
8+
types: [opened, reopened, ready_for_review] # [opened, synchronize, reopened, ready_for_review]
9+
issue_comment:
10+
types: [created] # [created, edited]
11+
12+
jobs:
13+
review:
14+
runs-on: agent
15+
16+
permissions:
17+
contents: read
18+
pull-requests: write
19+
issues: write
20+
21+
steps:
22+
- name: Check LLM Server
23+
env:
24+
OPENAI_API_BASE: ${{ secrets.OPENAI_API_BASE }}
25+
OPENAI_KEY: ${{ secrets.OPENAI_KEY }}
26+
MODEL: ${{ secrets.MODEL_NAME }}
27+
run: |
28+
curl -sf "$OPENAI_API_BASE/models" -H "Authorization: Bearer $OPENAI_KEY"
29+
- name: Run PR-Agent
30+
uses: qodo-ai/pr-agent@main
31+
env:
32+
OPENAI_API_BASE: ${{ secrets.OPENAI_API_BASE }}
33+
OPENAI_KEY: ${{ secrets.OPENAI_KEY }}
34+
GITHUB_TOKEN: ${{ secrets.PR_GITHUB_TOKEN }}
35+
config.model: "openai/${{ secrets.MODEL_NAME }}"
36+
config.custom_model_max_tokens: "4196"
37+
38+
github_action_config.auto_review: "true"
39+
github_action_config.auto_describe: "true"
40+
github_action_config.auto_improve: "true"

0 commit comments

Comments
 (0)