Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Nectr-AI/nectr-ai-pr-review-agent/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Fetch complete details for a single PR review by its event ID, including the full AI-generated summary and all analyzed files.
Authentication
Requires a valid JWT token in the Authorization header:
Authorization: Bearer YOUR_JWT_TOKEN
Path Parameters
The unique event ID of the review
Response
Returns a single review object with full details.
Type of event (e.g., “pull_request”)
Event source (e.g., “github”)
Processing status: pending, processing, completed, or failed
Current PR status: open, merged, or closed
Timestamp when the event was created
Timestamp when the event was processed (null if pending)
Repository full name (owner/repo)
GitHub username of the PR author
Direct URL to the pull request on GitHub
Complete AI-generated review summary including verdict, confidence score, and detailed findings
Total number of files analyzed by the AI reviewer
Example Request
curl -X GET "https://api.nectr.ai/api/v1/reviews/1234" \
-H "Authorization: Bearer YOUR_JWT_TOKEN"
Example Response
{
"id": 1234,
"event_type": "pull_request",
"source": "github",
"status": "completed",
"pr_status": "open",
"created_at": "2026-03-10T14:30:00Z",
"processed_at": "2026-03-10T14:32:15Z",
"pr_title": "Add user authentication endpoints",
"pr_number": 42,
"repo_name": "acme/api-server",
"branch": "feature/auth",
"author": "johndoe",
"pr_url": "https://github.com/acme/api-server/pull/42",
"ai_summary": "APPROVE\n\nConfidence: 4/5\n\nThis PR implements secure user authentication endpoints with JWT token generation and validation. The implementation follows security best practices and includes comprehensive error handling.\n\n🟢 **Minor Suggestion**: Consider rate-limiting authentication attempts\n\n### Security\n- Password hashing uses bcrypt with appropriate cost factor\n- JWT tokens include expiration and refresh mechanism\n- Input validation prevents injection attacks\n\n### Code Quality\n- Clean separation of concerns\n- Comprehensive unit tests included\n- API documentation is thorough\n\n### Recommendation\nThis PR is ready to merge. The authentication implementation is solid and follows industry standards.",
"files_analyzed": 8
}
Error Responses
Review Not Found
{
"detail": "Review not found"
}
HTTP Status: 404 Not Found
Unauthorized
{
"detail": "Not authenticated"
}
HTTP Status: 401 Unauthorized
The ai_summary field contains a structured review with the following elements:
- Verdict: One of
APPROVE, REQUEST_CHANGES, or NEEDS_DISCUSSION
- Confidence Score: Rated from 1/5 to 5/5
- Categorized Issues: Grouped by severity with emoji indicators:
- 🔴 Critical: Security vulnerabilities, breaking changes, data loss risks
- 🟡 Moderate: Performance issues, code quality concerns, missing tests
- 🟢 Minor: Style suggestions, documentation improvements, refactoring opportunities
- Detailed Analysis: Context-aware insights based on the codebase and PR changes
- Recommendation: Final verdict on whether the PR should be merged
Use Cases
Display Full Review in UI
review = get_review(review_id)
if review['status'] == 'completed':
print(f"PR #{review['pr_number']}: {review['pr_title']}")
print(f"Files analyzed: {review['files_analyzed']}")
print("\nAI Review:")
print(review['ai_summary'])
else:
print(f"Review status: {review['status']}")
Extract Verdict and Confidence
import re
review = get_review(review_id)
summary = review['ai_summary']
# Extract verdict
if 'APPROVE' in summary:
verdict = 'APPROVE'
elif 'REQUEST_CHANGES' in summary:
verdict = 'REQUEST_CHANGES'
elif 'NEEDS_DISCUSSION' in summary:
verdict = 'NEEDS_DISCUSSION'
# Extract confidence score
match = re.search(r'Confidence: (\d)/5', summary)
confidence = int(match.group(1)) if match else None
print(f"Verdict: {verdict} (Confidence: {confidence}/5)")