[api] Add task diff API endpoint #4

Closed
maks wants to merge 1 commit from task/74130f47-add-task-diff-api-endpoint into master
Owner

Implemented by Claude Code agent

Task: Add GET /api/projects/{id}/tasks/{task_id}/diff that returns the git diff for a task's worktree branch against its base branch. Should work for tasks in running, reviewing, review_passed, and needs_review states. Return structured diff with file list, additions/deletions counts, and raw unified diff text.

Success Criteria:
GET /api/projects/{pid}/tasks/{tid}/diff returns JSON with files array (path, status, additions, deletions, patch) and summary (total_files, total_additions, total_deletions). Returns 404 if branch doesn't exist, 400 if task is in backlog/ready state.


⚠️ Review score: 59/100 — BELOW threshold (85) — needs manual review

Implemented by Claude Code agent **Task:** Add GET /api/projects/{id}/tasks/{task_id}/diff that returns the git diff for a task's worktree branch against its base branch. Should work for tasks in running, reviewing, review_passed, and needs_review states. Return structured diff with file list, additions/deletions counts, and raw unified diff text. **Success Criteria:** GET /api/projects/{pid}/tasks/{tid}/diff returns JSON with files array (path, status, additions, deletions, patch) and summary (total_files, total_additions, total_deletions). Returns 404 if branch doesn't exist, 400 if task is in backlog/ready state. --- ⚠️ Review score: **59/100** — BELOW threshold (85) — needs manual review
Returns structured git diff for a task's branch against its base branch,
including per-file stats (path, status, additions, deletions, patch) and
summary totals. Returns 400 for backlog/ready tasks, 404 if branch missing.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
maks closed this pull request 2026-04-07 21:16:11 +02:00

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
maks/shipfast!4
No description provided.