Skip to content

feat: run code-review on hosted runners + issue triage - #64

Merged
WillIsback merged 14 commits into
mainfrom
feat/ci-cd-integration-and-issues
Oct 8, 2026
Merged

WillIsback merged 14 commits into
mainfrom
feat/ci-cd-integration-and-issues

Conversation

@WillIsback

Copy link
Copy Markdown
Owner

Summary

  • Remove the self-hosted runner: reviews now run on ephemeral GitHub-hosted runners (ubuntu-latest). The private vLLM is reached through a Cloudflare Tunnel guarded by a Cloudflare Access service token plus the vLLM --api-key (two independent layers).
  • Issue triage: target-type: issue fetches the issue title/body/comments and posts a structured triage comment. PR number can be resolved from a head SHA for the workflow_run context.
  • No untrusted code on the runner: the action never checks out or executes PR code — the diff, issue context, and source files are fetched via the GitHub API (Contents API, percent-encoded paths).
  • Fork-safe workflow_run pattern; new action inputs (target-type, target-number, head-sha, cf-access-*); example workflows under examples/; docs updated; the repo's own CI now runs the review on a hosted runner.

Key files

  • Code: crates/code-review-cli/src/{config,vllm,github,review,source,main}.rs
  • Action: action.yml
  • Examples: examples/code-review-{gate,pr,issue}.yml
  • Repo CI: .github/workflows/ci.yml
  • Docs: README.md, docs/code-review.md, .env.example

Test Plan

  • cargo fmt --check — clean
  • cargo clippy --workspace -- -D warnings — clean
  • cargo test --workspace — 55 passed, 0 failed
  • Configure secrets VLLM_URL, VLLM_API_KEY, CF_ACCESS_CLIENT_ID, CF_ACCESS_CLIENT_SECRET and the Cloudflare Tunnel + Access policy
  • Verify PR review against a real PR (tunnel reachable, Access accepts the service token)
  • Verify issue triage on a test issue (issues: [opened])

Notes

  • Examples pin the action to WillIsback/code-review@<full-sha>; replace <full-sha> with a reviewed release commit before use (never @main).
  • Local main is behind/diverged from origin/main — reconcile before merging.

WillIsback added 14 commits June 14, 2026 00:48
- vllm.rs: send Authorization header in detect_model() GET /v1/models
- ci.yml: pass vllm-api-key input from VLLM_API_KEY secret
- Cargo.toml: bump version 0.3.0 → 0.4.0
- GithubConfig carries TargetType + optional target number; PR number can
  be resolved from a head SHA (workflow_run)
- post_pr_comment -> post_comment (issues endpoint serves both)
- fetch_issue_context + format_issue_context; fetch_source_files via the
  Contents API (no checkout); resolve_pr_number/resolve_head_sha
- review_diff/* take pre-fetched source files; add review_issue
- source.rs exposes is_safe_path + MAX_SOURCE_LINES, drops fs reader
…n-and-issues

# Conflicts:
#	.github/workflows/ci.yml
#	crates/code-review-cli/src/vllm.rs
@WillIsback
WillIsback merged commit e1073b2 into main Oct 8, 2026
1 of 2 checks passed
@WillIsback
WillIsback deleted the feat/ci-cd-integration-and-issues branch October 8, 2026 21:04
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