diff options
| author | Paul Buetow <paul@buetow.org> | 2025-06-28 00:45:19 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2025-06-28 00:45:19 +0300 |
| commit | 0c072d964d4d07e69d1c0af1f3b09f9adc543571 (patch) | |
| tree | 64df6d5011ac946c0439fc98291e66a08d2e88f1 /cmd | |
| parent | 921782160c1f07577035db56b5461a2edc3b30a8 (diff) | |
feat: add --delete-repo command to delete repositories from all organizations
- 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 <noreply@anthropic.com>
Diffstat (limited to 'cmd')
| -rw-r--r-- | cmd/gitsyncer/main.go | 7 |
1 files changed, 5 insertions, 2 deletions
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)) |
