Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/paramveer-cyber/Deployaar/llms.txt

Use this file to discover all available pages before exploring further.

The pullRequestReview router manages the AI code review lifecycle for pull requests generated by the Deployaar coding agent. After the agent opens a PR, you trigger a review at the desired depth. The AI examines the diff, scores it against the feature’s acceptance criteria, and produces a structured list of issues with severities and file-level hints. You can resolve or unresolve individual issues and compare consecutive review attempts to see whether the code is improving.
All procedures require authentication. Access control is enforced at the feature request level — you must be a member of the organization that owns the feature request’s project.

pullRequestReview.getReviews — query

Returns all review attempts for a given feature request in reverse-chronological order. Each attempt is identified by an incrementing attemptNumber.

Input

featureRequestId
string (UUID)
required
The UUID of the feature request whose reviews should be listed.

Response

{
  "success": true,
  "message": "Found",
  "data": {
    "reviews": [
      {
        "id": "c56a4180-65aa-42ec-a945-5fd21dec0538",
        "featureRequestId": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
        "prNumber": 47,
        "attemptNumber": 2,
        "headSha": "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2",
        "depth": "depth_1",
        "verdict": "passed",
        "summary": "The implementation is clean and meets all acceptance criteria. No blocking issues found.",
        "blockingIssueCount": 0,
        "createdAt": "2024-01-15T14:00:00.000Z"
      }
    ]
  }
}

pullRequestReview.getReview — query

Fetches a single review by its UUID.

Input

reviewId
string (UUID)
required
The UUID of the review to retrieve.

Response

{
  "success": true,
  "message": "Found",
  "data": {
    "review": {
      "id": "c56a4180-65aa-42ec-a945-5fd21dec0538",
      "featureRequestId": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
      "prNumber": 47,
      "attemptNumber": 1,
      "headSha": "b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3",
      "depth": "depth_1",
      "verdict": "needs_work",
      "summary": "The CSV export is functional but the streaming path is not implemented for large datasets, which is a blocking acceptance criterion.",
      "blockingIssueCount": 1,
      "createdAt": "2024-01-15T13:00:00.000Z"
    }
  }
}

pullRequestReview.getReviewIssues — query

Returns all issues raised by a specific review. Issues are grouped by severity in the response. Resolved issues are included alongside their resolution metadata.

Input

reviewId
string (UUID)
required
The UUID of the review whose issues should be listed.

Response

{
  "success": true,
  "message": "Found",
  "data": {
    "issues": [
      {
        "id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
        "reviewId": "c56a4180-65aa-42ec-a945-5fd21dec0538",
        "severity": "critical",
        "category": "acceptance_criteria",
        "filePath": "apps/web/src/routes/reports/export.ts",
        "lineHint": 42,
        "explanation": "The export endpoint buffers the entire dataset in memory before writing to the response. The acceptance criteria specifies streaming for result sets over 100,000 rows.",
        "isBlocking": true,
        "resolvedByUserId": null,
        "resolvedAt": null,
        "createdAt": "2024-01-15T13:00:00.000Z"
      }
    ]
  }
}

pullRequestReview.resolveIssue — mutation

Marks a review issue as manually resolved by the authenticated user. Use this to acknowledge known trade-offs or confirm that a fix has been applied outside the automated review cycle.

Input

issueId
string (UUID)
required
The UUID of the issue to resolve.

Response

{
  "success": true,
  "message": "Issue resolved",
  "data": {
    "issue": {
      "id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
      "reviewId": "c56a4180-65aa-42ec-a945-5fd21dec0538",
      "resolvedByUserId": "auth0|abc123",
      "resolvedAt": "2024-01-15T13:45:00.000Z",
      "...": "..."
    }
  }
}

pullRequestReview.unresolveIssue — mutation

Reverts a manual resolution, marking the issue as unresolved again.

Input

issueId
string (UUID)
required
The UUID of the issue to unresolve.

Response

{
  "success": true,
  "message": "Issue unresolved",
  "data": {
    "issue": {
      "id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
      "reviewId": "c56a4180-65aa-42ec-a945-5fd21dec0538",
      "resolvedByUserId": null,
      "resolvedAt": null,
      "...": "..."
    }
  }
}

pullRequestReview.getReviewDelta — query

Computes the improvement delta between the two most recent review attempts for a feature request. Returns null when fewer than two reviews exist. Use this to show the user whether the coding agent’s second pass made progress.

Input

featureRequestId
string (UUID)
required
The UUID of the feature request for which the delta should be computed.

Response

{
  "success": true,
  "message": "Found",
  "data": {
    "delta": {
      "previousAttemptNumber": 1,
      "currentAttemptNumber": 2,
      "previousBlockingCount": 3,
      "currentBlockingCount": 0,
      "resolved": 3,
      "remaining": 0,
      "isImproving": true
    }
  }
}
When currentBlockingCount reaches 0 and verdict is passed, the feature request is ready for release approval via featureRequest.approveRelease.

pullRequestReview.getAllReviews — query

Returns a paginated list of all reviews across every project the authenticated user can access, with denormalized feature request and project metadata. Useful for cross-project review dashboards.

Input

limit
number
Maximum number of reviews to return. Minimum 1, maximum 100. Defaults to 50.
offset
number
Number of reviews to skip. Minimum 0. Defaults to 0.

Response

{
  "success": true,
  "message": "Found",
  "data": {
    "reviews": [
      {
        "id": "c56a4180-65aa-42ec-a945-5fd21dec0538",
        "prNumber": 47,
        "attemptNumber": 2,
        "headSha": "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2",
        "depth": "depth_1",
        "verdict": "passed",
        "summary": "All acceptance criteria met.",
        "blockingIssueCount": 0,
        "featureRequestId": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
        "featureRequestTitle": "Add CSV export to the reports page",
        "projectId": "1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed",
        "projectName": "Customer Portal",
        "createdAt": "2024-01-15T14:00:00.000Z"
      }
    ]
  }
}

ReviewIssueResult type reference

id
string (UUID)
Unique identifier of the issue.
reviewId
string (UUID)
The review this issue belongs to.
severity
"critical" | "major" | "minor" | "suggestion"
Severity level of the issue. Only critical and major issues with isBlocking: true can prevent a review from passing.
category
string (enum)
One of: correctness | security | performance | style | acceptance_criteria | edge_case | other
filePath
string | null
Relative path to the file where the issue was found, e.g. apps/api/src/routes/export.ts. null if the issue is not file-specific.
lineHint
number | null
Approximate line number hint within filePath. Not a precise diff line — treat as a navigation aid.
explanation
string
Human-readable description of the issue written by the AI reviewer.
isBlocking
boolean
Whether this issue prevents the review verdict from being passed. Blocking issues must be resolved (manually or by a subsequent successful review attempt) before the feature request can be approved.
resolvedByUserId
string | null
The user ID who manually resolved the issue, or null if unresolved.
resolvedAt
Date | null
Timestamp when the issue was manually resolved, or null.
createdAt
Date
Timestamp when the issue was created during the review run.

ReviewDelta type reference

previousAttemptNumber
number
Attempt number of the older of the two compared reviews.
currentAttemptNumber
number
Attempt number of the newer of the two compared reviews.
previousBlockingCount
number
Number of blocking issues in the older review.
currentBlockingCount
number
Number of blocking issues in the newer review. 0 means the review passed.
resolved
number
Count of blocking issues that existed in the previous review but are absent (or resolved) in the current one.
remaining
number
Count of blocking issues that persist across both review attempts.
isImproving
boolean
true when currentBlockingCount is strictly less than previousBlockingCount.

TypeScript example

import { trpc } from "~/trpc/client";

const featureRequestId = "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d";

// List all reviews for a feature request
const { data: reviewsData } = trpc.pullRequestReview.getReviews.useQuery({
  featureRequestId,
});

const latestReview = reviewsData?.data.reviews[0];

// Fetch issues for the latest review
const { data: issuesData } = trpc.pullRequestReview.getReviewIssues.useQuery(
  { reviewId: latestReview?.id ?? "" },
  { enabled: latestReview != null },
);

// Manually resolve an issue
const resolveMutation = trpc.pullRequestReview.resolveIssue.useMutation();

await resolveMutation.mutateAsync({
  issueId: "7c9e6679-7425-40de-944b-e07fc1f90ae7",
});

// Check improvement delta between the last two review attempts
const { data: deltaData } = trpc.pullRequestReview.getReviewDelta.useQuery({
  featureRequestId,
});

const delta = deltaData?.data.delta;
if (delta) {
  console.log(
    `Attempt ${delta.previousAttemptNumber}${delta.currentAttemptNumber}: ` +
    `${delta.resolved} blocking issues resolved, ${delta.remaining} remaining. ` +
    `Improving: ${delta.isImproving}`
  );
}

REST equivalent (curl)

# List all reviews for a feature request
curl https://api.deployaar.com/api/feature-requests/{featureRequestId}/reviews \
  -H "Authorization: Bearer <token>"

# Get a single review
curl https://api.deployaar.com/api/reviews/{reviewId} \
  -H "Authorization: Bearer <token>"

# Get issues for a review
curl https://api.deployaar.com/api/reviews/{reviewId}/issues \
  -H "Authorization: Bearer <token>"

# Resolve an issue
curl -X POST https://api.deployaar.com/api/reviews/issues/{issueId}/resolve \
  -H "Authorization: Bearer <token>"

# Unresolve an issue
curl -X POST https://api.deployaar.com/api/reviews/issues/{issueId}/unresolve \
  -H "Authorization: Bearer <token>"

# Get improvement delta
curl https://api.deployaar.com/api/feature-requests/{featureRequestId}/review-delta \
  -H "Authorization: Bearer <token>"

Build docs developers (and LLMs) love