forked from anomalyco/opencode
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Problem
taskctl start hardcodes dev as the base branch in two places:
packages/opencode/src/tasks/job-commands.ts:84—git checkout -b feature/issue-NNN devpackages/opencode/src/tasks/pulse-scheduler.ts:155-190—git rev-parse --verify devandgit merge-base dev HEAD
This breaks taskctl start in any repo whose mainline is not named dev (e.g. main, master, trunk).
Fix
Detect the default branch dynamically using:
git symbolic-ref refs/remotes/origin/HEAD --short
# → e.g. "origin/main" → strip prefix → "main"This pattern already exists in packages/opencode/src/worktree/index.ts. Extract it into a shared utility and use it in both executeStart and pulse-scheduler.ts.
Fallback chain if detection fails:
git symbolic-ref refs/remotes/origin/HEAD --shortgit remote show origin | grep 'HEAD branch''dev'(last resort)
Quality Gates
- Tests written (TDD preferred)
- Coverage meets project threshold
- Linting passes
- Local verification complete
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working