# AI use cases for OSS PR Reviewer (vuphongle/oss-pr-reviewer)

Repo: [vuphongle/oss-pr-reviewer](https://github.com/vuphongle/oss-pr-reviewer) | Use cases: 4 | Page: https://dedupedai.com/use-cases/vuphongle-oss-pr-reviewer/

oss-pr-reviewer is a TypeScript command-line tool that uses OpenAI to review a GitHub pull request and write a Markdown or JSON report of possible bugs, security risks, regressions, and missing tests.

This file holds every use case of this repo. Each one starts with a "## " heading and ends with its URL.

- Review one pull request and save a Markdown report: https://dedupedai.com/use-cases/vuphongle-oss-pr-reviewer/review-one-pr-to-markdown-report/
- Export review findings as JSON for a CI step: https://dedupedai.com/use-cases/vuphongle-oss-pr-reviewer/get-json-review-findings-for-ci/
- Add an advisory AI review to pull request workflows: https://dedupedai.com/use-cases/vuphongle-oss-pr-reviewer/add-advisory-pr-review-to-github-actions/
- Set repo-specific review rules and ignored paths: https://dedupedai.com/use-cases/vuphongle-oss-pr-reviewer/set-repo-review-rules-and-ignored-paths/

## How to review one pull request and save a Markdown report with OSS PR Reviewer

Repo: [vuphongle/oss-pr-reviewer](https://github.com/vuphongle/oss-pr-reviewer) | Difficulty: Intermediate | Time: 30 minutes | Basis: From the README

Generate a local AI review report for a single GitHub pull request to check before merging.

**Who it is for:** An open-source maintainer who has a pull request waiting and wants a structured first pass before doing their own review.

**The problem:** Gathering changed files, finding patches that need attention, and writing up review notes takes time at the start of every review.

**The outcome:** A review.md file with findings, pull request metadata, statistics, skipped files, and a disclaimer that the maintainer reads and acts on.

### Steps

1. Clone the repository and run `npm install` in the checkout.
2. Run `npm run build` to produce the dist folder.
3. Run `export GITHUB_TOKEN=...` and `export OPENAI_API_KEY=...` with your own values.
4. Run `node dist/cli/index.js review --repo owner/repository --pr 123 --min-severity medium --output review.md`. (inferred, check the README)
5. Open review.md and check each finding against the pull request code before deciding anything.

### Prompt to paste into your agent

```text
In the vuphongle/oss-pr-reviewer checkout, build the CLI and run node dist/cli/index.js review --url <pull-request-url> --output review.md. Confirm review.md exists and list the findings with their severity and file path, noting any skipped files or an incomplete status. Do not approve or merge the pull request.
```

### Caveat

The tool reviews only the supplied pull request metadata and patches, not the full repository, and it never claims a pull request is correct or safe.

Risk, credentials: The GitHub and OpenAI keys must stay in your environment; never paste them into the report, issues, or logs.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/vuphongle-oss-pr-reviewer/review-one-pr-to-markdown-report/

## How to export review findings as JSON for a CI step with OSS PR Reviewer

Repo: [vuphongle/oss-pr-reviewer](https://github.com/vuphongle/oss-pr-reviewer) | Difficulty: Advanced | Time: 45 minutes | Basis: From the README

Write a machine-readable review of a pull request so a pipeline can read the results.

**Who it is for:** A maintainer or DevOps engineer who wants a CI job to read review results from a pull request without parsing Markdown.

**The problem:** A Markdown report is easy for people to read but hard for a pipeline to act on consistently.

**The outcome:** A review.json file produced by the CLI that a later CI script can parse, while the final decision stays with a human.

### Steps

1. Run `npm install` and `npm run build` in the checkout.
2. Set `GITHUB_TOKEN` and `OPENAI_API_KEY` in the CI secret store and export them for the job.
3. Run `node dist/cli/index.js review --repo owner/repository --pr 123 --output review.json --output-format json`.
4. Have the next CI step read review.json and report the findings, without failing the build on a high or critical finding alone.

### Prompt to paste into your agent

```text
In the oss-pr-reviewer checkout, run node dist/cli/index.js review --repo <owner/repository> --pr <number> --output review.json --output-format json. Verify that review.json parses as JSON and summarize the findings by severity. Do not treat a high or critical finding as a merge decision.
```

### Caveat

The README says a high or critical finding does not make the process fail, so your CI step must add its own rule if you want a gate.

Risk, credentials: Store the OpenAI and GitHub keys as CI secrets and avoid echoing them in job logs.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/vuphongle-oss-pr-reviewer/get-json-review-findings-for-ci/

## How to add an advisory AI review to pull request workflows with OSS PR Reviewer

Repo: [vuphongle/oss-pr-reviewer](https://github.com/vuphongle/oss-pr-reviewer) | Difficulty: Intermediate | Time: 30 minutes | Basis: From the README

Post a bounded review summary to each pull request job without blocking merges.

**Who it is for:** A repository maintainer who wants every new or updated pull request to get a consistent advisory review in GitHub Actions.

**The problem:** Maintainers often repeat the same context-gathering work on every pull request, and reviewers need the output close to the code.

**The outcome:** A workflow run that appends the Markdown report to the job summary and, optionally, one updated PR comment that includes the reviewed head SHA.

### Steps

1. Create a workflow file with a pull_request trigger for opened, synchronize, and reopened events.
2. Set permissions to contents: read and pull-requests: read for summary-only mode.
3. Use `uses: vuphongle/oss-pr-reviewer@v0.4.0` with github-token and openai-api-key set from repository secrets.
4. Add `post-comment: true` only if you also grant pull-requests: write.
5. Check the job summary after a pull request run and treat the report as advisory.

### Prompt to paste into your agent

```text
Add a GitHub Actions workflow to the target repository that uses vuphongle/oss-pr-reviewer@v0.4.0 on pull_request events with summary-only permissions. Confirm the workflow YAML parses and that openai-api-key is read from secrets. Do not add pull_request_target or enable comment posting without asking.
```

### Caveat

The Action does not create annotations or enforce a merge policy, and comment publication is best-effort under concurrent runs.

Risk, credentials: Keep the OpenAI key in repository secrets; fork pull requests normally cannot access them under pull_request.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/vuphongle-oss-pr-reviewer/add-advisory-pr-review-to-github-actions/

## How to set repo-specific review rules and ignored paths with OSS PR Reviewer

Repo: [vuphongle/oss-pr-reviewer](https://github.com/vuphongle/oss-pr-reviewer) | Difficulty: Intermediate | Time: 30 minutes | Basis: From the README

Add a base-branch config file that sets minimum severity, custom rules, and ignored paths.

**Who it is for:** A maintainer who wants reviews to follow the project's own expectations, such as requiring tests for changes under src/.

**The problem:** Generic review guidance misses project conventions, and generated or documentation files add noise to every review.

**The outcome:** A .oss-pr-reviewer.yml file on the base branch that sets the default minimum severity, adds rules, and excludes paths before AI review.

### Steps

1. Copy examples/oss-pr-reviewer.yml from the checkout as a starting point.
2. Edit the review.minSeverity, rules, and ignore.paths entries to fit your project.
3. Commit the file to the base branch, since the tool loads it from the pull request's base commit rather than the PR branch.
4. Run `node dist/cli/index.js review --repo owner/repository --pr 123 --min-severity medium --output review.md` and check the skipped-file section of the report. (inferred, check the README)

### Prompt to paste into your agent

```text
In the oss-pr-reviewer checkout, read docs/configuration.md and create a .oss-pr-reviewer.yml for <owner/repository> with one rule and one ignored path. Verify the YAML parses and that the ignored path is listed in the skipped-file section of a generated report. Do not place the file on a pull request branch.
```

### Caveat

Rule text is treated as untrusted guidance, and CLI options override the repository file, so a flag can change the result you expect from the config.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/vuphongle-oss-pr-reviewer/set-repo-review-rules-and-ignored-paths/
