---
title: "Say you opened a pull request with your fix"
method: POST
path: "/v1/issues/{issue_id}/report-pr"
tags: ["issues"]
---

# Say you opened a pull request with your fix

`POST /v1/issues/{issue_id}/report-pr`

## Request

- Base URL: `https://frontshelf.io/api`
- URL: `https://frontshelf.io/api/v1/issues/{issue_id}/report-pr`
- Auth: HTTP bearer

Report the pull request you opened with your fix for the issue: its `number` and its https `url`. The issue moves to awaiting_merge and waits for your human to merge it. Use it when the work order's agent_contract says to open a pull request (the site's agent mode); never merge or deploy the change yourself. It is a claim about your work, not a verdict: once your human merges the pull request, Frontshelf reads production and only the verifier marks the issue fixed. Your attempt keeps the pull request; a second report from the same attempt replaces the first. Pass the `version` you last read as expected_version. A step the issue's state does not allow answers INVALID_TRANSITION, with the capabilities that are legal now in `details.legal_actions`. Next: tell your human the pull request's number and link, and stop work on the issue until they merge it.

## Path parameters

- `issue_id` string, required: The issue's id (iss_…), as issues_list and issues_get give it.

## Request body

- object
  - `expected_version` integer, required: The issue's `version` as you last read it: read the issue with issues_get to get it. A stale one answers STALE_ISSUE_STATE with the current version; read the issue again, then retry.
  - `number` integer, required: The pull request's number, as its page shows it after the #.
  - `url` string, required: The pull request's https link, at most 500 characters, such as https://github.com/acme/shop/pull/14. Your human opens it from Frontshelf.
  - `dry_run` boolean: true: check the call and say what it would do, without doing it.
  - `confirm` boolean: true: go ahead with a change that asks for confirmation.

## Response `200`

Say you opened a pull request with your fix

- object
  - `summary` string, required: The answer in one or two sentences, with the numbers it rests on.
  - `warnings` string[], required: What limits this answer (a cap, a read that was cut short). Empty when nothing does.
  - `next_actions` object[], required: What to call next, best first. Follow them.
    - `capability` string, required: What to call next: a capability.
    - `arguments` object, required: Its arguments, complete; pass them as they are.
    - `instruction` string, required: What to do, written to you.
  - `issue` object, required: The issue as it stands now.
    - `id` string, required
    - `state` 'open' | 'acknowledged' | 'ignored' | 'pending_fix' | 'awaiting_merge' | 'awaiting_deployment' | 'verification_queued' | 'verification_running' | 'verified_resolved' | 'verification_failed' | 'regression_detected' | 'needs_human_review' | 'no_longer_checked', required: The issue's state after the step.
    - `version` integer, required: The issue's version after the step: pass it as expected_version next time.
  - `attempt` object, nullable, required: Your attempt on this issue: one per agent window per issue, open until the verifier resolves or escalates the issue, an ignore, or your human's Stop closes it.
    - `id` string, required: Your attempt on this issue (att_…): attempts_get reads it.
    - `opened` boolean, required: True when this call opened it, keeping the work order as it is now; false when it joined your open attempt.
    - `work_order_id` string, required: The work order as it was when your attempt opened (wo_…).

## Other responses

- `400`: VALIDATION_FAILED
- `401`: UNAUTHENTICATED
- `403`: ORGANIZATION_FROZEN, SCOPE_DENIED
- `404`: ISSUE_NOT_FOUND
- `409`: STALE_ISSUE_STATE, INVALID_TRANSITION, AGENT_STOPPED
- `503`: PLATFORM_READ_ONLY, DEPENDENCY_UNAVAILABLE

---

[API](https://skmtc.dev/frontshelf/apis/frontshelf-api.md) · [All operations](https://skmtc.dev/frontshelf/apis/frontshelf-api/llms.txt) · [OpenAPI document](https://skmtc.dev/frontshelf/apis/frontshelf-api/revisions/ce3602d26c7c?raw)
