-
-
Notifications
You must be signed in to change notification settings - Fork 53
41 lines (34 loc) · 1.01 KB
/
copilot.yml
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
35
36
37
38
39
40
41
name: AI Code Reviewer
on:
pull_request_target:
types: [opened, synchronize, reopened]
jobs:
ai_review:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- name: Generate App Token
id: generated_token
uses: tibdex/[email protected]
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.PRIVATE_KEY }}
- name: Checkout Repository
uses: actions/checkout@v3
- name: Set Up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install Dependencies
run: |
pip install -r requirements.txt
pip install PyGithub
- name: Run AI Code Reviewer
env:
GITHUB_TOKEN: ${{ steps.generated_token.outputs.token }}
BOT: ${{ secrets.BOT }}
GITHUB_REPOSITORY: ${{ github.repository }}
PR_NUMBER: ${{ github.event.pull_request.number }}
run: python etc/tool/copilot.py