Request
POST https://repopack.com/api/v0/projects/<key>/tasks/<number>/merge
Authorization: Bearer <token>
Content-Type: application/json
{}
The caller must pass task merge authority; the server verifies current submission, exact reviewed head, readiness evidence, open blockers and the base branch before attempting a squash merge. If the project enables guarded task merges, the request waits for human confirmation with 428; otherwise the authorized server merge runs immediately. A later change to ownership, head, readiness, base or branch can produce 409 instead of merging stale work. Missing/unreadable project returns 401, hidden task 404, and denied merge authority 403.
A successful response contains the presented task, branch, base_ref, closed:true, merged_sha, and possibly trigger_warning. A task already merged returns already_closed:true without merging twice; a task closed without merging returns 409. The merge may queue Job/App triggers and restack children; inspect the task and any recovery warning before repeating after a timeout. This API action never substitutes for the independent review of a submitted head. See review guide.