feat(repo): support gh's repo-create source/push/remote flags to attach an existing local repo #843

Open
opened 2026-10-20 16:50:46 +00:00 by hexajon · 0 comments
Owner

What happens

Making an existing local repo remote is one idea, but no single madtea command does it. init covers an empty or new directory only. repo create makes a remote, but it does not wire that remote to my local history or push it. So I assemble the task by hand: repo create, then a manual remote wire, then a push.

Why it matters

gh already solves this exact case: gh repo create myrepo --source=. --push --remote=origin --private creates the remote, wires it, and pushes the current history in one command. ADR 0016 anchors madtea's command and flag names to gh first, so the gh shape is the one to adopt, not a new madtea-unique verb.

Fix

Add gh's --source, --push, and --remote flags to repo create, and the matching parameters on madt_repos action=create, so one call creates the remote repo, wires origin, and pushes the existing local history. This keeps the gh muscle memory that ADR 0016 anchors, and it removes the hand-assembled sequence.

Acceptance criteria

  • madtea repo create accepts --source, --push, and --remote, with gh's flag names (ADR 0016).
  • madt_repos action=create exposes the matching parameters (ADR 0014 parity).
  • With those flags, one call creates the remote repo, wires the named remote, and pushes the current branch.
  • A test covers the create-wire-push path.
  • ADR 0016 (match gh verbatim), #371 (madt_init discoverability, closed).
## What happens Making an existing local repo remote is one idea, but no single madtea command does it. `init` covers an empty or new directory only. `repo create` makes a remote, but it does not wire that remote to my local history or push it. So I assemble the task by hand: `repo create`, then a manual remote wire, then a push. ## Why it matters gh already solves this exact case: `gh repo create myrepo --source=. --push --remote=origin --private` creates the remote, wires it, and pushes the current history in one command. ADR 0016 anchors madtea's command and flag names to gh first, so the gh shape is the one to adopt, not a new madtea-unique verb. ## Fix Add gh's `--source`, `--push`, and `--remote` flags to `repo create`, and the matching parameters on `madt_repos action=create`, so one call creates the remote repo, wires `origin`, and pushes the existing local history. This keeps the gh muscle memory that ADR 0016 anchors, and it removes the hand-assembled sequence. ## Acceptance criteria - `madtea repo create` accepts `--source`, `--push`, and `--remote`, with gh's flag names (ADR 0016). - `madt_repos action=create` exposes the matching parameters (ADR 0014 parity). - With those flags, one call creates the remote repo, wires the named remote, and pushes the current branch. - A test covers the create-wire-push path. ## Related - ADR 0016 (match gh verbatim), #371 (`madt_init` discoverability, closed).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
sixfold-space/madtea#843
No description provided.