-
Notifications
You must be signed in to change notification settings - Fork 145
61 lines (54 loc) · 1.96 KB
/
Copy pathpullfrog.yml
File metadata and controls
61 lines (54 loc) · 1.96 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Pullfrog Review
on:
pull_request:
types: [labeled]
permissions:
id-token: write
contents: read
pull-requests: write
issues: write
actions: read
checks: read
statuses: write
concurrency:
group: pullfrog-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
review:
if: github.event.pull_request.head.repo.full_name == github.repository && github.event.label.name == 'pullfrog-review'
runs-on: ubuntu-latest
steps:
- name: Remove trigger label
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
script: |
await github.rest.issues.removeLabel({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.payload.pull_request.number,
name: 'pullfrog-review',
});
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- name: Build prompt
id: build_prompt
run: |
{
echo "prompt<<PULLFROG_EOF"
echo "Review pull request #${{ github.event.pull_request.number }} in ${{ github.repository }}."
echo "Fetch the PR diff and description via the GitHub API, review the changes for bugs, logic errors, and design problems, and leave a PR review with inline comments on specific problem areas. Do not push any commits."
echo "PULLFROG_EOF"
} >> "$GITHUB_OUTPUT"
- name: Run pullfrog
uses: pullfrog/pullfrog@cff281d72c6a5e38af001e7b38d15cf4dedda768 # v0.1.43
with:
prompt: ${{ steps.build_prompt.outputs.prompt }}
model: ${{ vars.PULLFROG_MODEL }}
push: disabled
status_checks: enabled
timeout: 30m
env:
CLAUDE_CODE_OAUTH_TOKEN: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}