ORCH-110: Git operations (clone, commit, push) #245

Closed
opened 2026-02-02 21:12:42 +00:00 by jason.woltje · 0 comments
Owner

Implement git operations using simple-git.

Acceptance Criteria

  • src/git/git-operations.service.ts implemented
  • Clone repository
  • Create branch
  • Commit changes with message
  • Push to remote
  • Git config (user.name, user.email)

Implementation

Implemented GitOperationsService in NestJS with:

  • Clone repository (with optional branch)
  • Create and checkout new branch
  • Commit changes (with git user config)
  • Push to remote (with force option)
  • Comprehensive error handling with GitOperationError

Testing

  • 14 unit tests (all passing)
  • 100% statement coverage
  • 85.71% branch coverage
  • Mock simple-git (no actual git operations)

Files

  • apps/orchestrator/src/git/git-operations.service.ts - Main service
  • apps/orchestrator/src/git/git-operations.service.spec.ts - Tests
  • apps/orchestrator/src/git/types/git-operations.types.ts - Types
  • apps/orchestrator/src/git/git.module.ts - NestJS module
  • apps/orchestrator/src/git/index.ts - Exports

Dependencies

Used existing:

  • simple-git library (already in package.json)
  • Git config from orchestrator.config.ts (GIT_USER_NAME, GIT_USER_EMAIL)

Notes

  • Follows TDD principles (Red-Green-Refactor)
  • All git operations are async
  • Error handling preserves original error messages
  • Service uses dependency injection for testability
Implement git operations using simple-git. ## Acceptance Criteria - [x] src/git/git-operations.service.ts implemented - [x] Clone repository - [x] Create branch - [x] Commit changes with message - [x] Push to remote - [x] Git config (user.name, user.email) ## Implementation Implemented GitOperationsService in NestJS with: - Clone repository (with optional branch) - Create and checkout new branch - Commit changes (with git user config) - Push to remote (with force option) - Comprehensive error handling with GitOperationError ## Testing - 14 unit tests (all passing) - 100% statement coverage - 85.71% branch coverage - Mock simple-git (no actual git operations) ## Files - apps/orchestrator/src/git/git-operations.service.ts - Main service - apps/orchestrator/src/git/git-operations.service.spec.ts - Tests - apps/orchestrator/src/git/types/git-operations.types.ts - Types - apps/orchestrator/src/git/git.module.ts - NestJS module - apps/orchestrator/src/git/index.ts - Exports ## Dependencies Used existing: - simple-git library (already in package.json) - Git config from orchestrator.config.ts (GIT_USER_NAME, GIT_USER_EMAIL) ## Notes - Follows TDD principles (Red-Green-Refactor) - All git operations are async - Error handling preserves original error messages - Service uses dependency injection for testability
jason.woltje added this to the M6-AgentOrchestration (0.0.6) milestone 2026-02-02 21:12:42 +00:00
jason.woltje added the orchestrator label 2026-02-02 21:12:42 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mosaic/stack#245