Everything K-culture — comebacks to K-beauty, straight to your inboxGet it in your inbox

METAL MEDIA

vuphongle/oss-pr-reviewer

45TypeScriptMIT

A CLI that lets OpenAI scan GitHub pull requests and hands maintainers a Markdown risk report

oss-pr-reviewer pulls a pull request's metadata and changed-file patches from GitHub, sends them to OpenAI for structured analysis, then validates and merges the results into a Markdown report flagging bugs, security risks, regressions, and missing tests. It explicitly describes itself as an assistant, not an approval system, leaving the final call to human maintainers. Built in TypeScript, it also ships as an opt-in GitHub Action.

What it does

  1. Uses Octokit to fetch PR metadata and diffs, skipping binary, patchless, or oversized files with stated reasons in the report.
  2. Splits large diffs into fixed-size batches (60,000 characters total, 30,000 per file, 8 files per batch) before sending them to OpenAI, then validates the JSON response with Zod and applies deduplication plus deterministic severity filtering.
  3. Reads an optional .oss-pr-reviewer.yml from the PR's base branch (not the PR branch itself) to set minimum severity, custom review rules, and ignored paths, preventing a PR from silently altering its own review policy.
  4. Ships a composite GitHub Action for pull_request events that always posts the report to the job summary, and can optionally create or update a single owned PR comment without duplicating it.
  5. A high or critical finding does not fail the CLI process by itself; only configuration, API, filesystem, or validation errors return a non-zero exit code.

Why it matters

It automates the repetitive context-gathering part of PR review for maintainers who can't manually check every changed file, while treating repository content as untrusted input, which matters for anyone evaluating whether it's safe to plug an AI reviewer into a real workflow.

Terms in this repo

  • Octokit · Official library that wraps the GitHub API for easier programmatic access
  • Zod · A TypeScript library for validating that data matches an expected shape
  • prompt injection · An attack where malicious instructions are hidden inside data fed to an AI to override its original instructions
  • severity filtering · Sorting findings into levels like low, medium, high, critical and dropping ones below a chosen threshold
  • base branch · The target branch a pull request will merge into, representing the code state before the change

Repository description (English)

AI-powered CLI for reviewing GitHub pull requests, detecting potential bugs, security risks, regressions, and missing tests, with structured Markdown reports for open-source maintainers.

Open on GitHub

Trending repos

All repos →

Latest from METAL MEDIA