# plan\_push

Preview a push of a task's branch to origin without pushing anything.

writes · not idempotent · destructive · CLI only · [Agent](https://komrad.dev/latest/api/agent.md)

## Calling it

```bash
curl -X POST http://127.0.0.1:8787/komrad.agent.v1.AgentService/PlanPush \
  -H 'Content-Type: application/json' \
  -d '{
  "task_id": "<task_id>"
}'
```

```bash
komrad rpc plan-push \
  --task-id '<uuid>'
```

## Request

### PlanPushRequest

PlanPushRequest asks what a push of a task's branch would do, without doing it.

| Field | Type | Description |
| --- | --- | --- |
| [one of](https://komrad.dev/latest/api/agent/plan-push.md#komrad-agent-v1-PlanPushRequest-task)\* |  | The task whose branch to plan a push of. |
| [`task_id`](https://komrad.dev/latest/api/agent/plan-push.md#komrad-agent-v1-PlanPushRequest-task_id) | uuid | The task, by id. |
| [`task_slug`](https://komrad.dev/latest/api/agent/plan-push.md#komrad-agent-v1-PlanPushRequest-task_slug) | string not empty | The task, by slug. |

## Response

### PlanPushResponse

| Field | Type | Description |
| --- | --- | --- |
| [`branch`](https://komrad.dev/latest/api/agent/plan-push.md#komrad-agent-v1-PlanPushResponse-branch) | string | The branch that would be pushed. |
| [`commits`](https://komrad.dev/latest/api/agent/plan-push.md#komrad-agent-v1-PlanPushResponse-commits) | int32 | How many commits would be pushed, counted against origin's copy of the branch, or against the base branch when origin has none. |
| [`forced`](https://komrad.dev/latest/api/agent/plan-push.md#komrad-agent-v1-PlanPushResponse-forced) | bool | Whether origin's copy has commits the branch does not, which the push would overwrite. |
| [`uncommitted_files`](https://komrad.dev/latest/api/agent/plan-push.md#komrad-agent-v1-PlanPushResponse-uncommitted_files) | int32 | How many files have changes that are not committed and would not be pushed. |
| [`in_sync`](https://komrad.dev/latest/api/agent/plan-push.md#komrad-agent-v1-PlanPushResponse-in_sync) | bool | Whether origin already has every commit on the branch. |
