> ## Documentation Index
> Fetch the complete documentation index at: https://docs.devinenterprise.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 获取最新的 Devin Review 状态

> 返回 Enterprise 范围内某个 PR 的最新 Devin Review。

所属组织会根据 ``pr_url`` 在服务器端解析——
方式与触发端点相同。如果省略 ``commit_sha``，
则会从提供商获取 PR 当前的 head commit
并使用它。如果解析后的 commit 没有对应的 review，
则返回 ``404``。

<div id="permissions">
  ## 权限
</div>

需要具有企业级 `UseReviewManual` 权限的服务用户。


## OpenAPI

````yaml zh/v3-openapi.yaml GET /v3/enterprise/pr-reviews
openapi: 3.1.0
info:
  description: 采用 Service User 身份验证和 RBAC 的 Devin v3 API
  title: Devin API v3
  version: 3.0.0
servers: []
security:
  - bearerAuth: []
paths:
  /v3/enterprise/pr-reviews:
    get:
      tags:
        - pr-reviews
      summary: 获取最新的 Devin Review 状态
      description: |-
        返回 Enterprise 范围内某个 PR 的最新 Devin Review。

        所属组织会根据 ``pr_url`` 在服务器端解析——
        方式与触发端点相同。如果省略 ``commit_sha``，
        则会从提供商获取 PR 当前的 head commit
        并使用它。如果解析后的 commit 没有对应的 review，
        则返回 ``404``。
      operationId: handle_get_pr_review_status_v3_enterprise_pr_reviews_get
      parameters:
        - description: 要查找的拉取请求/合并请求的完整 URL（例如 `https://github.com/owner/repo/pull/123`）。
          in: query
          name: pr_url
          required: true
          schema:
            description: 要查找的拉取请求/合并请求的完整 URL（例如 `https://github.com/owner/repo/pull/123`）。
            examples:
              - https://github.com/owner/repo/pull/123
            title: Pr Url
            type: string
        - description: 要查找的提交 SHA（完整值或短前缀）。省略时，默认使用 PR 当前的头部提交。
          in: query
          name: commit_sha
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: 要查找的提交 SHA（完整值或短前缀）。省略时，默认使用 PR 当前的头部提交。
            examples:
              - abc123def4567890abc123def4567890abc123de
            title: Commit Sha
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PrReviewResponse'
          description: 成功响应
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: 验证错误
components:
  schemas:
    PrReviewResponse:
      properties:
        commit_sha:
          description: 将被审查的 PR 头部提交的 SHA。
          title: Commit Sha
          type: string
        created_at:
          description: 审查被接受的时间。
          format: date-time
          title: Created At
          type: string
        pr_number:
          description: 拉取/合并请求编号。
          title: Pr Number
          type: integer
        repo_path:
          description: 规范化的带主机前缀的代码仓库路径（例如 `github.com/owner/repo`）。
          title: Repo Path
          type: string
        status:
          description: 当前审查状态。新接受的审查初始状态为 `pending`。
          enum:
            - pending
            - running
            - completed
            - errored
            - cancelled
          title: Status
          type: string
      required:
        - status
        - repo_path
        - pr_number
        - commit_sha
        - created_at
      title: PrReviewResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
  securitySchemes:
    bearerAuth:
      description: 服务用户凭据（前缀：cog_）
      scheme: bearer
      type: http

````