---
title: "Get Pr Analysis"
method: GET
path: "/pr/{owner}/{name}/{pr_number}"
tags: ["public"]
---

# Get Pr Analysis

`GET /pr/{owner}/{name}/{pr_number}`

The newest analysis the bot persisted for this pull request.

Newest rather than a named SHA: the URL carries no SHA, and the reader
arriving from a comment wants whatever the comment currently describes. A
superseded head's analysis is still addressable by primary key for the
re-push delta, it is just not what this serves.

## Path parameters

- `owner` string, required
- `name` string, required
- `pr_number` integer, required

## Response `200`

Successful Response

- PrAnalysisResponse — What the per-PR page renders from. The scalars are the promoted columns; ``analysis`` is the projection the bot wrote. Splitting them is not cosmetic: everything outside ``analysis`` is queryable by other surfaces, and everything inside it is pruned once the PR is superseded or long closed, at which point this endpoint stops serving the PR at all.
  - `owner` string, required
  - `repo` string, required
  - `pr_number` integer, required
  - `pr_title` string, nullable
  - `pr_author` string, nullable
  - `pr_state` string, required
  - `head_sha` string, required
  - `analyzed_at` string, required
  - `health_before` number, nullable
  - `health_after` number, nullable
  - `change_risk_score` number, nullable
  - `change_risk_percentile` number, nullable
  - `change_risk_priority` string, nullable
  - `changed_file_count` integer, required
  - `breaking_symbol_count` integer, required
  - `findings_introduced` integer, required
  - `findings_resolved` integer, required
  - `outside_caller_count` integer, required
  - `changed_paths` string[], required
  - `analysis` object, required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/repowise/apis/repowise-hosted-api.md) · [All operations](https://skmtc.dev/repowise/apis/repowise-hosted-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/repowise/repowise-hosted-api/revisions/1e57283a9737/schema)
