How rahulpaswan461/pr-reviwer-agent works
This is a pull-request diff reviewer that can run from standard input or in a GitHub Actions environment. Its main flow reads and redacts a diff, asks Groq for a schema-constrained review, validates the response (falling back to a fail-closed result), then prints JSON or posts a GitHub comment. The tree and README provide no further product documentation; the graph follows the sampled runtime source and omits unrelated example files.
Main entry points: index.js Review entrypoint · reviwer.js AI reviewer · postPRComment.js PR commenter · redact-secrets.js Secret redaction
Components 12
Diff intake
- Review entrypoint
index.js - Secret redaction
redact-secrets.js
AI review
- AI reviewer
reviwer.js - Output schema
ReviewJsonschema.js - Review validation
validateSchema.js - Fail-closed result
failed-closed-result.js
Result delivery
- PR commenter
postPRComment.js - Markdown formatter
to-markdown.js
Other components
- CLI or GitHub run
- Groq API
- GitHub API
- JSON output
Connections 13
- CLI or GitHub run → Review entrypoint: provides diff
- Review entrypoint → Secret redaction: redacts diff
- Review entrypoint → AI reviewer: requests review
- Review entrypoint → Output schema: supplies schema
- AI reviewer → Groq API: sends review request
- Groq API → AI reviewer: returns review
- AI reviewer → Review entrypoint: returns result
- Review entrypoint → Review validation: validates result
- Review entrypoint → Fail-closed result: builds on error
- Review entrypoint → PR commenter: posts in Actions
- Review entrypoint → JSON output: prints outside Actions
- PR commenter → Markdown formatter: formats result
- PR commenter → GitHub API: creates comment