From 0c072d964d4d07e69d1c0af1f3b09f9adc543571 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sat, 28 Jun 2025 00:45:19 +0300 Subject: feat: add --delete-repo command to delete repositories from all organizations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Added --delete-repo flag that accepts a repository name - Implemented DeleteRepo() methods in both GitHub and Codeberg API clients - Created HandleDeleteRepo handler with interactive confirmation - Shows clear status of repository across all configured organizations - Requires user to type "yes" to confirm deletion - Provides detailed feedback on success/failure for each deletion - Updated documentation and usage help 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- cmd/gitsyncer/main.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'cmd') diff --git a/cmd/gitsyncer/main.go b/cmd/gitsyncer/main.go index e41cc76..ddf00e3 100644 --- a/cmd/gitsyncer/main.go +++ b/cmd/gitsyncer/main.go @@ -26,8 +26,6 @@ func main() { os.Exit(cli.HandleTestGitHubToken()) } - - // Load configuration cfg, err := cli.LoadConfig(flags.ConfigPath) if err != nil { @@ -44,6 +42,11 @@ func main() { flags.WorkDir = cfg.WorkDir } + // Handle delete repository flag + if flags.DeleteRepo != "" { + os.Exit(cli.HandleDeleteRepo(cfg, flags.DeleteRepo)) + } + // Handle list organizations flag if flags.ListOrgs { os.Exit(cli.HandleListOrgs(cfg)) -- cgit v1.2.3