-
Notifications
You must be signed in to change notification settings - Fork 2
34 lines (30 loc) · 1.04 KB
/
code_review.yml
File metadata and controls
34 lines (30 loc) · 1.04 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
# .github/workflows/code_review.yml
name: AI Code Review
on:
pull_request:
types: [opened, synchronize]
permissions:
contents: read
pull-requests: write
jobs:
review:
runs-on: ubuntu-latest
steps:
- name: Checkout Pull Request Code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Run AI Code Review Agent
run: |
IMAGE_NAME="umykhailo/codereviewagent:latest"
docker run \
--volume ${{ github.workspace }}:/repo \
--workdir /repo \
--env LLM_API_KEY=${{ secrets.LLM_API_KEY }} \
--env GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} \
--env GITHUB_PR_NUMBER=${{ github.event.pull_request.number }} \
--env GITHUB_REPOSITORY=${{ github.repository }} \
--env GITHUB_BASE_REF=${{ github.base_ref }} \
--env GITHUB_HEAD_REF=${{ github.head_ref }} \
$IMAGE_NAME \
review --repo-path "." --base-ref "origin/${{ github.base_ref }}" --head-ref "${{ github.head_ref }}"