Revert gitfed-tui -create-repo
Added in v1.0.3 as a side effect of building a Claude Code skill, but never actually asked for — the skill request was for a document explaining how Claude can publish a repo, not a gitfed product change. -set-public/-set-private stay: those were added for the explicitly requested V1-launch task, not invented along the way.
2 files changed
+8 −30
M
CHANGELOG.md
+4 −0
M
cmd/gitfed-tui/main.go
+4 −30
CHANGELOG.md
@@ -1,5 +1,9 @@
# Changelog
+## 1.0.4
+
+- Reverted `gitfed-tui -create-repo` from 1.0.3 — it was a product change made as a side effect of building an unrelated Claude Code skill, without being asked for. `-set-public`/`-set-private` (added separately, for the actual V1 launch request) stay.
+
## 1.0.3
- `gitfed-tui -create-repo <owner/repo> -owner <username> [-public]`: creates a repo non-interactively, same rationale as `-set-public`/`-set-private` — scriptable over `kubectl exec` without driving the TUI's keystrokes. Built for a Claude Code skill that publishes a local repo to a running instance end-to-end.
cmd/gitfed-tui/main.go
@@ -23,9 +23,6 @@ func main() {
configPath := flag.String("config", "gitfed.json", "path to instance config file")
setPublic := flag.String("set-public", "", "non-interactive: make <repo> public and exit, skipping the TUI")
setPrivate := flag.String("set-private", "", "non-interactive: make <repo> private and exit, skipping the TUI")
- createRepo := flag.String("create-repo", "", "non-interactive: create <owner/repo> and exit, skipping the TUI (requires -owner)")
- createOwner := flag.String("owner", "", "local username that owns the repo created by -create-repo")
- createPublic := flag.Bool("public", false, "with -create-repo, also make the new repo public")
flag.Parse()
cfg, err := config.Load(*configPath)
@@ -42,10 +39,10 @@ func main() {
}
defer closeFn()
- // -set-public/-set-private/-create-repo exist so these operations are
- // scriptable (e.g. over `kubectl exec`) without driving the interactive
- // TUI's keystrokes against a live instance — every other admin action
- // still goes through the TUI on purpose.
+ // -set-public/-set-private exist so this one operation is scriptable
+ // (e.g. over `kubectl exec`) without driving the interactive TUI's
+ // keystrokes against a live instance — every other admin action still
+ // goes through the TUI on purpose.
if *setPublic != "" || *setPrivate != "" {
if *setPublic != "" && *setPrivate != "" {
fmt.Fprintln(os.Stderr, "gitfed-tui: pass only one of -set-public / -set-private")
@@ -63,29 +60,6 @@ func main() {
return
}
- if *createRepo != "" {
- if *createOwner == "" {
- fmt.Fprintln(os.Stderr, "gitfed-tui: -create-repo requires -owner <username>")
- os.Exit(1)
- }
- if err := ops.CreateRepo(*createRepo, *createOwner); err != nil {
- fmt.Fprintf(os.Stderr, "gitfed-tui: create-repo %s: %v\n", *createRepo, err)
- os.Exit(1)
- }
- if *createPublic {
- if err := ops.SetRepoPublic(*createRepo, true); err != nil {
- fmt.Fprintf(os.Stderr, "gitfed-tui: create-repo %s: set public: %v\n", *createRepo, err)
- os.Exit(1)
- }
- }
- visibility := "private"
- if *createPublic {
- visibility = "public"
- }
- fmt.Printf("%s created (owner: %s, %s)\n", *createRepo, *createOwner, visibility)
- return
- }
-
p := tea.NewProgram(newModel(ops, cfg.Domain, mode), tea.WithAltScreen())
if _, err := p.Run(); err != nil {
fmt.Fprintf(os.Stderr, "gitfed-tui: %v\n", err)