Browse API

Task stack

Inspect ancestry and confirm a pinned reparent/retarget plan.

GET/api/v0/projects/<key>/tasks/<number>/stack

Inspect stack ancestry

GET https://repopack.com/api/v0/projects/<key>/tasks/<number>/stack
Authorization: Bearer <token>

This requires task.read, not merely the ability to report a task. The response is the current stack view of this task and its ancestors/descendants. An unreadable project returns 401, absent permission 403, hidden task 404. Inspect merge order before moving any branch.

Move a task deliberately

PATCH https://repopack.com/api/v0/projects/<key>/tasks/<number>/stack
Authorization: Bearer <token>
Content-Type: application/json
Repopack-Base-Move-Id: <new UUID>

{"parent":123}

Supply exactly one of parent (attach or reparent to a visible task number), base:true (unstack onto the stack's base), or base_ref (retarget an unstacked task to an existing base branch). A clean, authorized move returns 200 directly. The server checks exact heads and topology before publishing. A conflict, stale plan, or rewrite of another owner's branch returns 409 with a next step and leaves the stack unchanged. Success reports task, parent, previous, current, restacked, rewritten descendants, and review_invalidations. Refresh rewritten checkouts with rp task checkout <number> --reset. Legacy POST attachment is not supported. Stack concepts explain why links are different.

Choose one UUID before sending the request. If the connection times out or the response is lost, repeat the same PATCH with the same UUID, account, task, and destination. It returns 202 with {"base_move_pending":true} while the original move is running, or replays its recorded final response; it does not rerun a recorded move. Do not send a new UUID after an uncertain outcome. If execution was interrupted before it could record an outcome, inspect the task and refs before starting another move. Requests without a UUID are rejected before starting any move. Update older rp installations or include the required header in your API client.