-
Notifications
You must be signed in to change notification settings - Fork 158
33 lines (32 loc) · 1.23 KB
/
pr-quality-check.yml
File metadata and controls
33 lines (32 loc) · 1.23 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
name: PR Quality Check
on:
pull_request_target:
types: [opened, reopened]
jobs:
pr_quality_check:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- run: pip install litellm PyGithub
- name: Run PR quality check agent
env:
# e.g: "claude-sonnet-4-6", "gpt-4o", etc.
MODEL: ${{ secrets.MODEL }}
# Only API key for the chosen model is required
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
# Obtained automatically by GH Actions
AUTHOR_ASSOCIATION: ${{ github.event.pull_request.author_association }}
AUTHOR_USERNAME: ${{ github.event.pull_request.user.login }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_BODY: ${{ github.event.pull_request.body }}
PR_NUMBER: ${{ github.event.pull_request.number }}
PR_TITLE: ${{ github.event.pull_request.title }}
REPO_NAME: ${{ github.repository }}
run: python scripts/agents/pr_checker_agent.py