Skip to content

[P0] Backend: Expose Git branch and commit APIs #270

@frankbria

Description

@frankbria

Problem

Steps 8-10 of the user journey require users to see git operations, but GitWorkflowManager is only used internally with no REST API exposure.

Current State

  • GitWorkflowManager exists at codeframe/git/workflow_manager.py
  • Has create_feature_branch(), commit_task_changes(), merge_to_main()
  • Database has git_branches table
  • No API endpoints expose this functionality

Required Implementation

New Router: /api/projects/{id}/git/

POST /api/projects/{id}/git/branches          # Create feature branch
GET  /api/projects/{id}/git/branches          # List branches
GET  /api/projects/{id}/git/branches/{name}   # Get branch details
POST /api/projects/{id}/git/commit            # Commit changes
GET  /api/projects/{id}/git/commits           # List commits
GET  /api/projects/{id}/git/status            # Get working tree status

WebSocket Events to Add

  • branch_created - When feature branch created
  • commit_created - Already exists, verify it fires

Acceptance Criteria

  • New git.py router created
  • All endpoints require authentication
  • WebSocket events broadcast on operations
  • Integration tests for all endpoints

Dependencies

  • None (uses existing GitWorkflowManager)

Blocks

  • #TBD (Git Commit UI)
  • #TBD (PR Creation API)

Committee Report Reference

This was identified as a critical gap by 11/11 expert agents in the UX/UI committee review. Step 8 of the user journey is invisible without this API.

Updated Dependencies

Metadata

Metadata

Assignees

No one assigned

    Labels

    P0-blocker-betaCritical blocker - must fix before beta testingarchitectureSystem architecture and design patternsenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions