What
Import both confluence-cli and jira-ticket-cli into this monorepo while preserving their full git history.
Tasks
-
Add confluence-cli as a git subtree:
git subtree add --prefix=tools/cfl https://github.com/open-cli-collective/confluence-cli.git main
-
Add jira-ticket-cli as a git subtree:
git subtree add --prefix=tools/jtk https://github.com/piekstra/jira-ticket-cli.git main
-
Create go.work at the repository root:
go 1.24
use (
./tools/cfl
./tools/jtk
)
-
Verify both tools build and their tests pass
Target Structure
atlassian-cli/
├── go.work
├── tools/
│ ├── cfl/ # confluence-cli with full history
│ │ ├── go.mod
│ │ ├── cmd/cfl/
│ │ ├── api/
│ │ └── internal/
│ └── jtk/ # jira-ticket-cli with full history
│ ├── go.mod
│ ├── cmd/jtk/
│ ├── api/
│ └── internal/
Why
Preserving git history matters
- Blame context: When debugging,
git blame shows the original author and commit message explaining why code was written that way
- Bisect capability:
git bisect can trace bugs back to the original introducing commit, even from the source repos
- Contributor attribution: Original authors retain credit for their work in the commit log
- Audit trail: For security reviews, having the full history shows how code evolved
Go workspaces enable gradual migration
- Both tools continue to work independently with their own
go.mod
- Shared code can be developed incrementally without breaking either tool
- Local development "just works" -
go build ./tools/cfl/cmd/cfl builds with workspace resolution
- No need to publish shared modules to test changes locally
Subtree vs submodule
We're using git subtree rather than git submodule because:
- Subtrees are simpler - no
.gitmodules to manage, no git submodule update required
- History is directly in the repo, not a pointer to another repo
- Contributors don't need to understand submodule workflows
- CI/CD is simpler - just clone, no submodule init
Acceptance Criteria
What
Import both
confluence-cliandjira-ticket-cliinto this monorepo while preserving their full git history.Tasks
Add confluence-cli as a git subtree:
Add jira-ticket-cli as a git subtree:
Create
go.workat the repository root:Verify both tools build and their tests pass
Target Structure
Why
Preserving git history matters
git blameshows the original author and commit message explaining why code was written that waygit bisectcan trace bugs back to the original introducing commit, even from the source reposGo workspaces enable gradual migration
go.modgo build ./tools/cfl/cmd/cflbuilds with workspace resolutionSubtree vs submodule
We're using
git subtreerather thangit submodulebecause:.gitmodulesto manage, nogit submodule updaterequiredAcceptance Criteria
git log --oneline tools/cfl/shows confluence-cli historygit log --oneline tools/jtk/shows jira-ticket-cli historygo work syncsucceedscd tools/cfl && go build ./cmd/cflproduces working binarycd tools/jtk && go build ./cmd/jtkproduces working binarycd tools/cfl && go test ./...passescd tools/jtk && go test ./...passes