How caique-neves-ferreira/pr-review-agent works
This repository is a .NET pull-request review agent invoked by GitHub Actions. Its main workflow reads the event and team standards, fetches the PR diff, asks OpenAI for a structured review, posts a PR comment, and exits unsuccessfully for high-severity findings. The core implementation is concentrated in Program.cs; README.md documents the Actions trigger and merge-gate use. The workflow file and standards file are present in the tree, but their contents were not sampled, so those relationships are based on README documentation.
Main entry points: Program.cs Review agent · pr-review.yml GitHub Actions · pr-standards.md Team standards
Components 12
Workflow
- GitHub Actions
.github/workflows/pr-review.yml
Review agent
- Review agent
tools/PrReview.Agent/Program.cs - PR event payload
- Team standards
docs/pr-standards.md - PR diff
- Review prompt
tools/PrReview.Agent/Program.cs - Structured review
tools/PrReview.Agent/Program.cs
Merge governance
- Severity gate
tools/PrReview.Agent/Program.cs - Branch protection
Other components
- Pull request
- OpenAI API
- PR comment
Connections 13
- Pull request → GitHub Actions: triggers
README.md - GitHub Actions → Review agent: runs
README.md - Review agent → PR event payload: reads
tools/PrReview.Agent/Program.cs - Review agent → Team standards: reads
tools/PrReview.Agent/Program.cs - Review agent → PR diff: fetches
tools/PrReview.Agent/Program.cs - Review agent → Review prompt: builds
tools/PrReview.Agent/Program.cs - Review prompt → OpenAI API: submits
tools/PrReview.Agent/Program.cs - OpenAI API → Structured review: returns JSON
tools/PrReview.Agent/Program.cs - Review agent → PR comment: posts
tools/PrReview.Agent/Program.cs - Review agent → Severity gate: checks severity
tools/PrReview.Agent/Program.cs - Severity gate → GitHub Actions: fails run
tools/PrReview.Agent/Program.cs - GitHub Actions → Branch protection: supplies status
README.md - Branch protection → Pull request: blocks merge
README.md