fix(pr-review): :4000 LiteLLM + auth secret + NO_PROXY + auto-merge trusted PRs#31
Merged
Conversation
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>
a32b346 to
0017ac3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Probe-driven fixes for the Phase 1 review agent (PR #28) plus the new auto-merge behavior:
LITELLM_BASE_URL/LITELLM_API_KEY/LITELLM_NO_PROXY). Keeps the workflow portable and out of the public source.run_review.shand inpr-review-probeboth sendAuthorization: Bearerso a misconfigured secret fails fast.post_review.pyreads the PR author and, if author ∈AUTO_MERGE_AUTHORS(defaultvaderyang, CSV override via the workflow env) AND the AI verdict is APPROVE, follows up the review withgh 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
pr-review-probefrom Actions UI onmainand confirm all 7 steps go green.vaderyangshould auto-merge.gh pr merge --admin --squash --delete-branchactually has permission to run from the runner. If not, falls back to leaving the PR open.🤖 Generated with Claude Code