Skip to content

Commit 8887fec

Browse files
Update Ai code reviewer
1 parent 306ca56 commit 8887fec

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

.github/workflows/copilot.yml

+15-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: AI Code Review
1+
name: AI Code Reviewer
22

33
on:
44
pull_request:
@@ -7,8 +7,18 @@ on:
77
jobs:
88
ai_review:
99
runs-on: ubuntu-latest
10+
permissions:
11+
contents: read
12+
pull-requests: write
1013

1114
steps:
15+
- name: Generate App token
16+
id: generated_token
17+
uses: tibdex/github-app-token@v2.1.0
18+
with:
19+
app_id: ${{ secrets.APP_ID }}
20+
private_key: ${{ secrets.PRIVATE_KEY }}
21+
1222
- name: Checkout Repository
1323
uses: actions/checkout@v3
1424

@@ -18,11 +28,13 @@ jobs:
1828
python-version: '3.x'
1929

2030
- name: Install Dependencies
21-
run: pip install -r requirements.txt
31+
run: |
32+
pip install -r requirements.txt
33+
pip install PyGithub
2234
2335
- name: Run AI Code Reviewer
2436
env:
25-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37+
GITHUB_TOKEN: ${{ steps.generated_token.outputs.token }}
2638
GITHUB_REPOSITORY: ${{ github.repository }}
2739
PR_NUMBER: ${{ github.event.pull_request.number }}
2840
run: python copilot.py

0 commit comments

Comments
 (0)