File tree Expand file tree Collapse file tree 4 files changed +63
-3
lines changed
Expand file tree Collapse file tree 4 files changed +63
-3
lines changed Original file line number Diff line number Diff line change 1+ rules :
2+ - repo : polka-codes/prompts
3+ path : review/preamble.md
4+ branch : master
5+ - repo : polka-codes/prompts
6+ path : review/rust.md
7+ branch : master
8+ - repo : polka-codes/prompts
9+ path : review/polkadot-sdk.md
10+ branch : master
Original file line number Diff line number Diff line change @@ -545,7 +545,7 @@ def main():
545545 # Output labels as JSON for GitHub Action
546546 import json
547547 labels_output = {"labels" : final_labels }
548- print (f"LABELS_JSON: { json .dumps (labels_output )} " )
548+ print_and_log (f"LABELS_JSON: { json .dumps (labels_output )} " )
549549 except ValueError as e :
550550 print_and_log (f'❌ { e } ' )
551551
Original file line number Diff line number Diff line change 1+ name : AI PR Review
2+
3+ on :
4+ # pull_request: # enable this when we think this is ready
5+ # types: [opened, ready_for_review]
6+ workflow_dispatch :
7+ inputs :
8+ pr_number :
9+ description : ' PR number to review'
10+ required : true
11+ type : number
12+
13+ permissions :
14+ contents : read
15+ pull-requests : write
16+
17+ concurrency :
18+ group : review-pr-${{ github.event.inputs.pr_number || github.event.number }}
19+ cancel-in-progress : true
20+
21+ jobs :
22+ review :
23+ timeout-minutes : 10
24+ runs-on : ubuntu-latest
25+ steps :
26+ - name : Checkout repository
27+ uses : actions/checkout@v4
28+ with :
29+ fetch-depth : 0
30+
31+ - name : Process PR
32+ uses : polka-codes/action@v2
33+ with :
34+ pr_number : ${{ github.event.inputs.pr_number || github.event.number }}
35+ review : true
36+ config : .config/review.polkacodes.yml
37+ env :
38+ POLKA_API_PROVIDER : google
39+ POLKA_MODEL : gemini-3-pro-preview
40+ GITHUB_TOKEN : ${{ github.token }}
41+ POLKA_API_KEY : ${{ secrets.GEMINI_API_KEY }}
42+ POLKA_BUDGET : 5
43+
Original file line number Diff line number Diff line change @@ -293,12 +293,19 @@ jobs:
293293 repository : ${{ env.REPO }}
294294 ref : ${{ env.PR_BRANCH }}
295295
296- - name : Download all artifacts
296+ - name : Download command-diff artifact
297297 uses : actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
298298 with :
299299 name : command-diff
300300 path : command-diff
301301
302+ - name : Download command-output artifact
303+ if : startsWith(github.event.inputs.cmd, 'label')
304+ uses : actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
305+ with :
306+ name : command-output
307+ path : command-output
308+
302309 - name : Apply labels for label command
303310 if : startsWith(github.event.inputs.cmd, 'label')
304311 uses : actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
@@ -310,7 +317,7 @@ jobs:
310317 let labels = [];
311318
312319 try {
313- const output = fs.readFileSync('/tmp/cmd /command_output.log', 'utf8');
320+ const output = fs.readFileSync('command-output /command_output.log', 'utf8');
314321
315322 // Parse JSON labels from output - look for "LABELS_JSON: {...}"
316323 const jsonMatch = output.match(/LABELS_JSON: (.+)/);
You can’t perform that action at this time.
0 commit comments