Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
102 commits
Select commit Hold shift + click to select a range
f7b36f3
feat(story): add story tool — PR/branch narrative and changelog
odilitime Mar 10, 2026
150a281
docs(story): README, changelog, and code comments with WHYs
odilitime Mar 10, 2026
2bc8796
Submit review only on manual run; inline client workflow; dedup same-…
odilitime Mar 10, 2026
2eec857
Fix job if (use vars not env); add workflow lint
odilitime Mar 10, 2026
444c53b
Pin actionlint to v1.7.11 (no v1 tag)
odilitime Mar 10, 2026
95a9f04
chore: sync package-lock.json with package.json for npm ci
odilitime Mar 10, 2026
085b3b5
Fix 'Committer identity unknown' in CI: set git user for merge/commit
odilitime Mar 10, 2026
6046a47
Report setup failure and exit 1; fix push auth in CI
odilitime Mar 10, 2026
bee56ac
Push auth, check-runs 422, and log artifact comments
odilitime Mar 10, 2026
f24ae1e
Push: use x-access-token:TOKEN URL format for GitHub; add install doc…
odilitime Mar 10, 2026
0564b63
Audit cycles 21–22: single-issue path, batch verifier format, dedup s…
odilitime Mar 10, 2026
7254e3b
CI push fix, merge push auth, Cycle 23 audit, GH Actions log tip
odilitime Mar 10, 2026
9772a97
Merge remote-tracking branch 'origin/master' into odi-dev
github-actions[bot] Mar 10, 2026
d7245f7
tools: fix issues in tools (README.md)
github-actions[bot] Mar 10, 2026
2d9b3c3
misc: fix issues in README (README.md)
github-actions[bot] Mar 10, 2026
dba2173
tools: fix issues in tools (api.ts)
github-actions[bot] Mar 10, 2026
009bdff
misc: improve code quality
github-actions[bot] Mar 10, 2026
90fc428
Workflow: optional branch input, pull-requests write, tip PR number
odilitime Mar 10, 2026
feda094
Merge branch 'odi-dev' of https://github.com/elizaos/prr into odi-dev
odilitime Mar 10, 2026
094af9d
Revert Run PRR (client) to PR number only; audit + small fixes
odilitime Mar 10, 2026
4f6f90d
tools: fix issues in tools (README.md)
github-actions[bot] Mar 10, 2026
9c4d35c
misc: fix issues in README (README.md)
github-actions[bot] Mar 10, 2026
681c248
fix: submit PRR summary as review only, not also as issue comment
odilitime Mar 10, 2026
112a7e5
Merge branch 'odi-dev' of https://github.com/elizaos/prr into odi-dev
odilitime Mar 10, 2026
5078180
Cycle 27 prompts.log audit: path 2F fix, inject cap, judge snippet fo…
odilitime Mar 10, 2026
d1f8fea
Base-merge when behind + Cycle 28 prompts.log audit (dismissal SKIP h…
odilitime Mar 10, 2026
12b9696
fix: pluralize iteration summary (1 issue / N issues) + Cycle 30 audit
odilitime Mar 10, 2026
c86b5da
audit: output.log + prompts.log babylon#1213 — workflow scope, positi…
odilitime Mar 10, 2026
6a7805a
audit: verify workdir on audit, clear verified state on head change, …
odilitime Mar 10, 2026
001b733
Apply pill-output.md fixes + base-merge push fix
odilitime Mar 10, 2026
d8f347f
Add debug instrumentation for tracked patterns
odilitime Mar 10, 2026
51dc80a
fix: base-merge and workdir push — API fallback + push unpushed commits
odilitime Mar 10, 2026
195b13c
fix: pill-output.md improvements — skip-list warning, RESULTS wording…
odilitime Mar 10, 2026
8713ab5
Add split-plan tool: PR decomposition planner
odilitime Mar 10, 2026
8dbf534
split-exec tool, pill/docs/rotation/redact improvements, typecheck sc…
odilitime Mar 10, 2026
8c6eaa2
split-exec: fix refspec for additional branches, disable route-to, pa…
odilitime Mar 10, 2026
81bdc7a
split-exec/split-plan: file-based splits, PR title vibe, pill-output …
odilitime Mar 11, 2026
302c3cb
Pill + split-exec improvements: git-push helper, JSON tool-markup, su…
odilitime Mar 11, 2026
0a90e07
Pill improvements: split-exec summary, base-branch fetch, ElizaCloud …
odilitime Mar 11, 2026
43e53b7
Resolve merge conflicts in CHANGELOG and AUDIT-CYCLES
odilitime Mar 11, 2026
1220e58
Merge branch 'odi-dev' of https://github.com/elizaos/prr into odi-dev
odilitime Mar 11, 2026
f4d4c19
Merge branch 'odi-dev' of https://github.com/elizaos/prr into odi-dev
odilitime Mar 11, 2026
dd8599e
prompts.log audit: narrow TARGET FILE(S), fix final-audit batching
odilitime Mar 11, 2026
00491d1
story: fetch full branch history by default, optional cap, rate-limit…
odilitime Mar 11, 2026
a7026fe
pill-output fixes + split-exec improvements
odilitime Mar 11, 2026
af15530
split-exec: auth handling, token check, push URL, log and debug tweaks
odilitime Mar 11, 2026
afd3fd2
pill: run only when --pill is passed; logger setPillEnabled
odilitime Mar 11, 2026
06a67ee
docs: README, changelog, code comments with WHYs
odilitime Mar 11, 2026
dd630e4
fix(workflows): accept pr_number as string, default to @babylon
odilitime Mar 12, 2026
f67c77f
chore: move docs into tools, split-plan fixes, logger prompts
odilitime Mar 12, 2026
cc282c3
ci(workflows): use Node 24, opt in to Node 24 for JS actions
odilitime Mar 12, 2026
0d51986
feat(workflows): add prr_ref input so checkout matches workflow ref
odilitime Mar 13, 2026
43c78c4
feat(conflict): phased 3-way resolution, sub-chunking, validation, docs
odilitime Mar 13, 2026
083f25e
fix(git): use Authorization header for push auth in CI
odilitime Mar 13, 2026
d7db9bd
conflict-resolve: retry once on parse validation failure with error hint
odilitime Mar 13, 2026
814e44c
feat(prr): thread replies (GitHub feedback), docs, tests, WHYs
odilitime Mar 13, 2026
c3f7498
Audit consolidation, scoped prompt/response slug, docs tidy, pill & s…
odilitime Mar 17, 2026
e0edc61
fix: base-branch fetch on single-branch clones so PR merges and decon…
odilitime Mar 17, 2026
95ec741
Output-log audit integration, prompts.log improvements, dismissal ski…
odilitime Mar 17, 2026
9bb1927
Conflict resolution: partial persistence, full-read story, no caps
odilitime Mar 17, 2026
534b6b8
Conflict resolution: top+tails fallback, parse retries, docs and WHYs
odilitime Mar 18, 2026
bb6609e
Pill improvements + Cycle 51: state exclusivity, audit re-queue, path…
odilitime Mar 18, 2026
075ffcf
feat: PRR reliability, thread replies, split rewrite, model catalog
odilitime Mar 20, 2026
ce20f54
feat(prr): catalog-backed dismiss + auto-heal for bogus model-id advice
odilitime Mar 20, 2026
0c81c5b
fix(prr): parse 'have X instead of Y' model rename pattern
odilitime Mar 20, 2026
5684f4a
docs: add WHYs to split rewrite plan implementation
odilitime Mar 20, 2026
8c48605
debug(prr): add logging for catalog model auto-heal detection
odilitime Mar 20, 2026
375498c
Implement pill-output.md improvements (cycles 1 & 2)
odilitime Mar 20, 2026
77b818c
Fix: markConflictsResolved skips deleted files
odilitime Mar 20, 2026
32f42d3
Fix: Pill chunking error - response is not defined
odilitime Mar 20, 2026
7c6ac39
feat: PRR catalog prompt context, Pill chunking, eval harness & CI
odilitime Mar 20, 2026
a902b27
feat(prr): rotation skip, path dismissal, verification cache, conflic…
odilitime Mar 23, 2026
efb9d31
Pill-output low-hanging fruit: env skip, scope, recovery marker, docs
odilitime Mar 23, 2026
719c3fd
fix(prr): use shared push() for dismissal and cleanup commits
odilitime Mar 23, 2026
fd5fb19
fix(git-push): use empty credential.helper=, not helper=!
odilitime Mar 23, 2026
87abb92
fix(llm): Qwen3-14B prompt cap + skip retries on context overflow
odilitime Mar 23, 2026
a9128c5
feat(llm): ElizaCloud model context table + 5xx debug expectations
odilitime Mar 23, 2026
161159a
fix(git): one-shot HTTPS push URL; pill scope; PRR workflow & tests
odilitime Mar 24, 2026
0b1a193
fix(elizacloud): fail fast on oversize LLM complete; GitHub errors he…
odilitime Mar 24, 2026
81ed5b1
docs: GitHub API failure logging (CHANGELOG, DEVELOPMENT); test logGi…
odilitime Mar 24, 2026
64db587
fix(elizacloud): cap final-audit batching to final-audit model budget
odilitime Mar 24, 2026
e85d78a
fix(git): use x-access-token:token format for HTTPS push URL
odilitime Mar 24, 2026
dd6b455
fix(elizacloud): final audit — fit prompts via snippet cap + tighter …
odilitime Mar 25, 2026
8a26071
feat(prr): startup version line + optional git/env revision
odilitime Mar 25, 2026
f9dec9f
feat(ci,elizacloud): build script, retries, token logs, completion cap
odilitime Mar 25, 2026
42afd63
fix(elizacloud): tighten small-context total input char cap for prefl…
odilitime Mar 25, 2026
417c2b3
feat(elizacloud): gateway model fallback after 2 consecutive 5xx
odilitime Mar 25, 2026
13938f3
PRR: final-audit cleanup, logging, llm-api injection, thread replies, UX
odilitime Mar 26, 2026
87572d9
feat(prr): bot review ingestion dedup, cross-file LLM dedup, dedup-v2…
odilitime Mar 28, 2026
1fb13f0
feat(elizacloud): skip Qwen 14B, normalize OpenAI content, doc skip t…
odilitime Mar 29, 2026
9ac7b70
feat(prr): truncation-aware final audit, UNCERTAIN, line-centered exc…
odilitime Mar 29, 2026
635e5b1
feat(github): normalize bot author labels for ic-* dedup + debug
odilitime Mar 29, 2026
9931309
fix(prr): path accounting, dedup clusters, final-audit uncertain, docs
odilitime Mar 30, 2026
f301068
fix(prr): align single-issue recovery allowedPaths with batch mode
odilitime Mar 30, 2026
10f86e1
fix(prr): RESULTS SUMMARY re-queue line with outcomes (pill-output #18)
odilitime Mar 30, 2026
c0f3115
feat(prr): session skip reset cadence, thinking-budget cap, pill docs
odilitime Mar 30, 2026
491d870
docs(prr): pill-output sweep — thin ElizaCloud pool warn, README/shar…
odilitime Mar 31, 2026
7eb7c4e
docs(readme): Philosophy — audit-driven guardrails and residual trust…
odilitime Mar 31, 2026
be08e37
refactor: modular PRR layout (llm, workflow, shared, pill)
odilitime Mar 31, 2026
61f406e
fix(split): clone fetch refspecs; expand split-plan/rewrite-plan tools
odilitime Apr 2, 2026
d5a6e05
tools: fix issues in tools (README.md)
odilitime Apr 10, 2026
632737a
misc: fix issues in README (README.md)
odilitime Apr 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 72 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# GitHub token for API access (required)
GITHUB_TOKEN=ghp_xxxxxxxxxxxxxxxxxxxx

# Optional: when the prr install has no .git/, stamp startup/output.log with this commit (short or full SHA).
# If .git exists in the prr package root, revision is taken from git instead. Do not use another repo's GITHUB_SHA.
# PRR_GIT_SHA=abc1234

# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# ElizaCloud - Unified Model Gateway (RECOMMENDED)
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Expand All @@ -14,6 +18,12 @@ ELIZACLOUD_API_KEY=your-elizacloud-key-here
# Default model (optional, defaults to gpt-4o):
# PRR_LLM_MODEL=gpt-4o

# ElizaCloud: extra 500/502/504 retries inside each complete() (0–15). CI defaults to 5 HTTP attempts when unset; locally 3.
# PRR_ELIZACLOUD_SERVER_ERROR_RETRIES=6

# After 2 consecutive gateway 5xx on the same model, try these ids in order (comma-separated). off = disable.
# PRR_ELIZACLOUD_GATEWAY_FALLBACK_MODELS=anthropic/claude-3-5-haiku-20241022,openai/gpt-4o-mini

# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# Alternative: Direct Provider Keys
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Expand All @@ -32,5 +42,66 @@ ELIZACLOUD_API_KEY=your-elizacloud-key-here
# RECOMMENDED: Leave commented out for auto-detect.
# PRR_TOOL=elizacloud

# Extended thinking token budget for Claude models (optional)
# Extended thinking token budget for Claude models (optional). Values above 500,000 clamp with a warning.
# PRR_THINKING_BUDGET=10000

# LLM concurrency (default 1). Raised values speed batches when the gateway allows it.
# PRR_MAX_CONCURRENT_LLM=3

# Optional: max ms per concurrent pool task (batch analysis / parallel fix groups). Unset or 0 = no cap.
# PRR_LLM_TASK_TIMEOUT_MS=600000

# Skip a fixer model for the rest of the run after this many verification failures with zero verified fixes (default 4). Set to 0 to disable.
# PRR_SESSION_MODEL_SKIP_FAILURES=4
# Every N fix iterations, clear session-skipped models so rotation retries them (0 = off). Pill-output #847.
# PRR_SESSION_MODEL_SKIP_RESET_AFTER_FIX_ITERATIONS=8

# Warn once after this many consecutive iterations with no new verified fixes (default 10). Set to 0 to disable.
# PRR_DIMINISHING_RETURNS_ITERATIONS=10

# ElizaCloud: built-in skip list is in shared/constants.ts (ELIZACLOUD_SKIP_MODEL_IDS).
# Add more models to skip for this machine/run (comma-separated API ids, merged with built-in list):
# PRR_ELIZACLOUD_EXTRA_SKIP_MODELS=openai/some-model-id

# ElizaCloud: re-enable specific models removed from the default skip list (comma-separated API ids).
# PRR_ELIZACLOUD_INCLUDE_MODELS=openai/gpt-4o

# Merge conflict preprocessing: disable automatic insertion of missing ======= between markers.
# PRR_DISABLE_CONFLICT_SEPARATOR_REPAIR=1

# Catalog model advice (see AGENTS.md): disable 0a6 dismissal and/or quoted-literal auto-heal.
# PRR_DISABLE_MODEL_CATALOG_SOLVABILITY=1
# PRR_DISABLE_MODEL_CATALOG_AUTOHEAL=1

# Thread replies: set to the GitHub login that posts replies so re-runs skip duplicate posts.
# PRR_BOT_LOGIN=my-bot
# PRR_REPLY_TO_THREADS=true
# Also reply on threads dismissed as chronic-failure (default: no — batch token-saving dismissals).
# PRR_THREAD_REPLY_INCLUDE_CHRONIC_FAILURE=1

# Exit 2 on success when final audit passed any issue via UNCERTAIN or truncation guard (fail closed).
# PRR_STRICT_FINAL_AUDIT_UNCERTAIN=1

# Exit setup before clone when CodeRabbit (or bot) review SHA ≠ PR HEAD — saves work if inline comments are stale.
# PRR_EXIT_ON_STALE_BOT_REVIEW=1

# Exit setup before clone when GitHub says PR is not mergeable / dirty (unless you pass --merge-base).
# PRR_EXIT_ON_UNMERGEABLE=1

# On PR HEAD change: clear every dismissal (default clears only "already-fixed" dismissals).
# PRR_CLEAR_ALL_DISMISSED_ON_HEAD=1

# Dry-merge probes after fetch (git merge-tree; warns before pull if conflicts):
# PRR_DISABLE_LATENT_MERGE_PROBE=1 # skip HEAD vs origin/<prBranch>
# PRR_DISABLE_LATENT_MERGE_PROBE_BASE=1 # skip HEAD vs origin/<prBase> (GitHub mergeable/dirty)

# Materialize a probe hit so LLM conflict resolution runs before pull:
# PRR_MATERIALIZE_LATENT_MERGE=1 # merge origin/<prBranch> --no-commit
# PRR_MATERIALIZE_LATENT_MERGE_BASE=1 # merge origin/<prBase> --no-commit

# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# Pill (log audit — optional, e.g. prr --pill)
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# When tools/prr exists under the pill target directory, drop improvements whose file paths
# look like the PR clone (src/, packages/, …). Set to 0 to record everything the LLM returns.
# PILL_TOOL_REPO_SCOPE_FILTER=0
68 changes: 68 additions & 0 deletions .github/workflows/eval.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Run Evals

on:
push:
branches:
- main
pull_request:
branches:
- main
schedule:
# Run full evals daily
- cron: '0 2 * * *'
workflow_dispatch:

jobs:
eval:
runs-on: ubuntu-latest
strategy:
matrix:
tool: [prr, pill, split-plan, story]
fail-fast: false

steps:
- uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'

- name: Install dependencies
run: npm ci

- name: Compile (emit dist/)
run: npm run build

- name: Run evals
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
ELIZACLOUD_API_KEY: ${{ secrets.ELIZACLOUD_API_KEY }}
run: |
# Run fast evals on PRs, full evals on main/schedule
if [ "${{ github.event_name }}" = "pull_request" ]; then
echo "Running fast evals (subset) for PR"
npm run eval -- run -t ${{ matrix.tool }} -b simple-fix || true
else
echo "Running full evals"
npm run eval -- run -t ${{ matrix.tool }} -b simple-fix --compare || true
# Add more benchmarks as they're created
fi
continue-on-error: true

- name: Upload eval results
if: always()
uses: actions/upload-artifact@v4
with:
name: eval-results-${{ matrix.tool }}
path: tests/evals/results/
retention-days: 30

- name: Check for regressions
if: github.event_name != 'pull_request'
run: |
# TODO: Implement regression check
# Fail if metrics regress significantly
echo "Regression check not yet implemented"
19 changes: 19 additions & 0 deletions .github/workflows/lint-workflows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Validate workflow syntax and expressions before they run.
# Catches: unrecognized context (e.g. env in job if), invalid expressions, bad refs.
# Run locally: npm run lint:workflows (requires actionlint in PATH, e.g. brew install actionlint).
name: Lint workflows

on:
push:
paths: ['.github/workflows/**']
pull_request:
paths: ['.github/workflows/**']

jobs:
actionlint:
name: actionlint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run actionlint
uses: rhysd/actionlint@v1.7.11
38 changes: 38 additions & 0 deletions .github/workflows/refresh-model-catalog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Refreshes generated/model-provider-catalog.json from official Anthropic + OpenAI doc URLs.
# WHY: Vendor model IDs change; a committed snapshot keeps PRR/tools aligned without manual edits.
name: Refresh model catalog

on:
schedule:
- cron: '0 6 * * 1' # Mondays 06:00 UTC (~weekly)
workflow_dispatch:

permissions:
contents: write

jobs:
update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: '20'
cache: npm

- run: npm ci

- run: npm run update-model-catalog

- name: Commit and push if changed
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add generated/model-provider-catalog.json
if git diff --staged --quiet; then
echo "No catalog changes."
else
git commit -m "chore: refresh model-provider-catalog.json"
git push
fi
83 changes: 66 additions & 17 deletions .github/workflows/run-prr-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
# 1. Actions → Run PRR (client) → Run workflow → enter PR number.
# 2. On the PR: add the "run-prr" label.
# 3. Request PRR as a reviewer: add a bot user (or GitHub App bot) as a collaborator,
# set PRR_REVIEWER_LOGIN to that bot's login (e.g. prr-bot or my-app[bot]), then
# when someone requests that reviewer on the PR, this workflow runs.
# set repository variable PRR_REVIEWER_LOGIN (Settings → Variables) to that bot's
# login (e.g. prr-bot or my-app[bot]); when that reviewer is requested, this workflow runs.
#
# WHY pass secrets.GITHUB_TOKEN: The job runs in this repo's context; no extra PAT needed.
# Inlined from run-prr-server.yml so validators that require runs-on accept this file.
# Other repos can still call run-prr-server.yml directly (workflow_call).
name: Run PRR (client)

on:
Expand All @@ -26,23 +27,71 @@ concurrency:

jobs:
prr:
# Run when: manual, or label "run-prr", or requested reviewer matches PRR_REVIEWER_LOGIN (set in env below).
name: Run PRR
# Run when: manual, or label "run-prr", or requested reviewer matches vars.PRR_REVIEWER_LOGIN.
# (env is not available in job-level if; use repository variable instead.)
if: |
github.event_name == 'workflow_dispatch' ||
(github.event_name == 'pull_request' && (
(github.event.action == 'labeled' && github.event.label.name == 'run-prr') ||
(github.event.action == 'review_requested' && env.PRR_REVIEWER_LOGIN != '' && github.event.requested_reviewer.login == env.PRR_REVIEWER_LOGIN)
(github.event.action == 'review_requested' && vars.PRR_REVIEWER_LOGIN != '' && github.event.requested_reviewer.login == vars.PRR_REVIEWER_LOGIN)
))
runs-on: ubuntu-latest
timeout-minutes: 60
env:
# Set to your bot's login (e.g. prr-bot or my-app[bot]) to run when that user is requested as a reviewer. Leave empty to disable.
PRR_REVIEWER_LOGIN: ''
uses: ./.github/workflows/run-prr-server.yml
with:
pr_number: ${{ github.event_name == 'workflow_dispatch' && inputs.pr_number || github.event.pull_request.number }}
prr_repo: ${{ github.repository }}
secrets:
# Caller's token; server receives it as PRR_GITHUB_TOKEN and uses it as GITHUB_TOKEN.
PRR_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ELIZACLOUD_API_KEY: ${{ secrets.ELIZACLOUD_API_KEY }}
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
permissions:
contents: write # checkout + PRR push
pull-requests: write # submit PR review (Create a review for a pull request)
steps:
- name: Checkout PRR
uses: actions/checkout@v4

- name: Resolve PR number
if: github.event_name == 'workflow_dispatch'
id: resolve-pr
run: echo "pr_number=${{ inputs.pr_number }}" >> $GITHUB_OUTPUT

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '24'
cache: 'npm'
cache-dependency-path: package-lock.json

# dist/ is gitignored — must compile before node dist/tools/prr/index.js (not a redundant typecheck).
- name: Install and compile PRR
run: |
npm ci
npm run build

- name: Configure Git
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"

- name: Run PRR
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PRR_SUBMIT_REVIEW: ${{ github.event_name == 'workflow_dispatch' }}
PRR_PR_NUMBER: ${{ github.event_name == 'pull_request' && github.event.pull_request.number || steps.resolve-pr.outputs.pr_number }}
ELIZACLOUD_API_KEY: ${{ secrets.ELIZACLOUD_API_KEY }}
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
run: |
node dist/tools/prr/index.js \
"https://github.com/${{ github.repository }}/pull/${{ github.event_name == 'pull_request' && github.event.pull_request.number || steps.resolve-pr.outputs.pr_number }}" \
--tool llm-api \
--no-wait-bot

# output.log + prompts.log are written to CWD (repo root) by PRR; upload as artifacts for debugging.
- name: Upload logs
if: always()
uses: actions/upload-artifact@v4
with:
name: prr-logs-${{ github.event_name == 'pull_request' && github.event.pull_request.number || steps.resolve-pr.outputs.pr_number }}
path: |
output.log
prompts.log
retention-days: 14
if-no-files-found: ignore
Loading
Loading