Skip to content

Phase 1: Create monorepo structure with git history #1

@rianjs

Description

@rianjs

What

Import both confluence-cli and jira-ticket-cli into this monorepo while preserving their full git history.

Tasks

  1. Add confluence-cli as a git subtree:

    git subtree add --prefix=tools/cfl https://github.com/open-cli-collective/confluence-cli.git main
  2. Add jira-ticket-cli as a git subtree:

    git subtree add --prefix=tools/jtk https://github.com/piekstra/jira-ticket-cli.git main
  3. Create go.work at the repository root:

    go 1.24
    
    use (
        ./tools/cfl
        ./tools/jtk
    )
  4. 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

  • git log --oneline tools/cfl/ shows confluence-cli history
  • git log --oneline tools/jtk/ shows jira-ticket-cli history
  • go work sync succeeds
  • cd tools/cfl && go build ./cmd/cfl produces working binary
  • cd tools/jtk && go build ./cmd/jtk produces working binary
  • cd tools/cfl && go test ./... passes
  • cd tools/jtk && go test ./... passes

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions