forked from anomalyco/opencode
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Bug
taskctl start <issueNumber> hardcodes const repo = "randomm/opencode" in job-commands.ts line 120. When running the opencode binary in a different project (e.g., sammas), it fetches issue content from randomm/opencode instead of the actual repo, causing the Composer to generate wrong tasks.
Root cause
packages/opencode/src/tasks/job-commands.ts line 120:
const repo = "randomm/opencode"Fix
Detect the repo from git remote of cwd:
const remoteResult = await $`git remote get-url origin`.cwd(cwd).quiet().nothrow()
const remoteUrl = new TextDecoder().decode(remoteResult.stdout).trim()
// parse github.com/owner/repo from SSH or HTTPS remote URL
const repo = parseGithubRepo(remoteUrl) ?? "randomm/opencode"Parse both formats:
git@github.com:owner/repo.git→owner/repohttps://github.com/owner/repo.git→owner/repo
Acceptance Criteria
taskctl startfetches the issue from the repo where the binary is running, not a hardcoded value- Falls back gracefully if remote detection fails
- Existing tests pass
Quality Gates
- TDD: tests before implementation
- Linting passes
- Local verification: all tests pass
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels