Skip to content

[AG-10] Add branch-per-task workflow with PR creation#1

Open
0xtechdean wants to merge 2 commits intomasterfrom
task/AG-10-branch-per-task-workflow
Open

[AG-10] Add branch-per-task workflow with PR creation#1
0xtechdean wants to merge 2 commits intomasterfrom
task/AG-10-branch-per-task-workflow

Conversation

@0xtechdean
Copy link
Owner

Summary

  • Add git-service.ts for branch/PR management via GitHub API
  • Auto-create branches when tasks start, PRs when tasks complete
  • Add GitHub webhook for PR merge → task done status updates
  • New "PR Review" column in Kanban board with PR badges

Changes

File Description
src/git-service.ts New service for branch/PR operations
src/taskdb.ts Add branch, prUrl, prNumber, prStatus fields
src/controllers/tasks.controller.ts Branch creation + PR creation logic
src/index.ts GitHub webhook handler
src/orchestrator.ts Add branch to AgentContext
public/index.html PR Review column, PR badges, branch display

Configuration Required

Set these environment variables:

  • GITHUB_TOKEN - GitHub personal access token with repo scope
  • GITHUB_OWNER - Repository owner (default: Othentic-Labs)
  • GITHUB_REPO - Repository name (default: ai-team)
  • GITHUB_WEBHOOK_SECRET - (Optional) Webhook signature verification

Acceptance Criteria

  • Agent creates branch when starting task
  • Branch follows naming convention: task/{id}-{slug}
  • Agent creates PR when completing task
  • PR description includes task context
  • PR link is stored on task record
  • Task status updates when PR is merged
  • Dashboard shows PR status on tasks
  • Branches are cleaned up after merge

Test Plan

  1. Create a task with an owner
  2. Move task to "Ready" → should create branch
  3. Agent completes → should create PR
  4. Merge PR → task moves to "Done"

🤖 Generated with Claude Code

0xtechdean and others added 2 commits January 12, 2026 13:21
- Add git-service.ts for branch/PR management via GitHub API
- Update Task interface with branch, prUrl, prNumber, prStatus fields
- Create branches when tasks start (pattern: task/{id}-{slug})
- Auto-create PRs when tasks complete
- Add GitHub webhook handler for PR merge events
- Add "PR Review" column to Kanban board
- Show PR badge and branch name on task cards
- Show PR info in task detail view
- Branch cleanup after PR merge

Acceptance Criteria:
- [x] Agent creates branch when starting task
- [x] Branch follows naming convention with task ID
- [x] Agent creates PR when completing task
- [x] PR description includes task context
- [x] PR link is stored on task record
- [x] Task status updates when PR is merged
- [x] Dashboard shows PR status on tasks
- [x] Branches are cleaned up after merge

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add feature bullet point for Git Branch Workflow
- Add GitHub environment variables to configuration table
- Add comprehensive Git Branch Workflow section with:
  - How it works overview
  - GitHub setup instructions
  - Webhook configuration
  - Branch naming convention
  - PR template details
  - Task status flow
  - Dashboard features
- Update Task Workflow section with PR Review step

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant