Skip to content

Auto-close tasks when PR branch is merged#57

Merged
bborn merged 1 commit intomainfrom
task/124-if-a-tasks-pr-has-been-merged-the-task-s
Jan 9, 2026
Merged

Auto-close tasks when PR branch is merged#57
bborn merged 1 commit intomainfrom
task/124-if-a-tasks-pr-has-been-merged-the-task-s

Conversation

@bborn
Copy link
Copy Markdown
Owner

@bborn bborn commented Jan 9, 2026

Summary

  • Add automatic detection of merged branches to close associated tasks
  • Executor worker loop checks every 30 seconds for tasks with merged branches
  • Multiple detection methods: git branch --merged, remote branch deletion check, and local branch ancestor check

Test plan

  • Build passes (go build ./...)
  • Existing tests pass (go test ./internal/db/... ./internal/executor/...)
  • New test added for GetTasksWithBranches()
  • Manual test: Create a task with a branch, merge the PR, verify task auto-closes within 30s

🤖 Generated with Claude Code

Add automatic detection of merged branches to close associated tasks:
- Add GetTasksWithBranches() to find tasks with branches that aren't done
- Add checkMergedBranches() that runs every 30s in executor worker loop
- Add isBranchMerged() to detect if a task's branch has been merged
- Detection methods: git branch --merged, remote branch deletion check,
  and local branch ancestor check

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@bborn bborn merged commit e0ecec9 into main Jan 9, 2026
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