Skip to content

fix(pr-review): :4000 LiteLLM + auth secret + NO_PROXY + auto-merge trusted PRs#31

Merged
vaderyang merged 2 commits into
mainfrom
fix/pr-review-config
May 20, 2026
Merged

fix(pr-review): :4000 LiteLLM + auth secret + NO_PROXY + auto-merge trusted PRs#31
vaderyang merged 2 commits into
mainfrom
fix/pr-review-config

Conversation

@vaderyang
Copy link
Copy Markdown
Collaborator

@vaderyang vaderyang commented May 20, 2026

Summary

Probe-driven fixes for the Phase 1 review agent (PR #28) plus the new auto-merge behavior:

  • LiteLLM endpoint config moved entirely to repo secrets (LITELLM_BASE_URL / LITELLM_API_KEY / LITELLM_NO_PROXY). Keeps the workflow portable and out of the public source.
  • Pre-flight auth check — pre-flight curl in run_review.sh and in pr-review-probe both send Authorization: Bearer so a misconfigured secret fails fast.
  • Auto-merge trusted-author PRs on APPROVEpost_review.py reads the PR author and, if author ∈ AUTO_MERGE_AUTHORS (default vaderyang, CSV override via the workflow env) AND the AI verdict is APPROVE, follows up the review with gh pr merge --admin --squash --delete-branch. Anyone else's PRs still wait for a human reviewer.

End-to-end round-trip verified manually from the runner (claude → LiteLLM → backend, expected token returned).

Test plan

  • After merge, re-trigger pr-review-probe from Actions UI on main and confirm all 7 steps go green.
  • Open a tiny PR (whitespace change) — post-CI auto-trigger should fire pr-review, post a verdict, and APPROVE verdicts on PRs authored by vaderyang should auto-merge.
  • Confirm gh pr merge --admin --squash --delete-branch actually has permission to run from the runner. If not, falls back to leaving the PR open.

🤖 Generated with Claude Code

Probe-driven config fixes for the Phase 1 review agent, plus the
auto-merge behavior requested by the maintainer:

* All LiteLLM endpoint config now reads from repo secrets
  (LITELLM_BASE_URL / LITELLM_API_KEY / LITELLM_NO_PROXY) instead
  of hardcoded values — keeps this workflow portable across
  deployments and out of the public repo's source.

* Pre-flight curl in run_review.sh and the probe both now send
  Authorization: Bearer so the key check fails fast if the secret
  is misconfigured.

* Auto-merge trusted-author PRs on APPROVE: post_review.py reads
  the PR author and, if author ∈ AUTO_MERGE_AUTHORS (default
  vaderyang, CSV override via workflow env) AND the AI verdict
  is APPROVE, follows up the review with gh pr merge --admin
  --squash --delete-branch. Repo doesn't have native --auto so
  we squash inline. Merge failure is logged but doesn't fail
  the workflow.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vaderyang vaderyang force-pushed the fix/pr-review-config branch from a32b346 to 0017ac3 Compare May 20, 2026 09:22
@vaderyang vaderyang merged commit d4ae4cc into main May 20, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant