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 /internal/cli/flags.go | |
| 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 'internal/cli/flags.go')
| -rw-r--r-- | internal/cli/flags.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/internal/cli/flags.go b/internal/cli/flags.go index aac339e..71708a2 100644 --- a/internal/cli/flags.go +++ b/internal/cli/flags.go @@ -23,6 +23,7 @@ type Flags struct { WorkDir string TestGitHubToken bool Clean bool + DeleteRepo string } // ParseFlags parses command-line flags and returns the flags struct @@ -46,6 +47,7 @@ func ParseFlags() *Flags { flag.StringVar(&f.WorkDir, "work-dir", "", "working directory for cloning repositories (default: ~/git/gitsyncer-workdir)") flag.BoolVar(&f.TestGitHubToken, "test-github-token", false, "test GitHub token authentication") flag.BoolVar(&f.Clean, "clean", false, "delete all repositories in work directory (with confirmation)") + flag.StringVar(&f.DeleteRepo, "delete-repo", "", "delete specified repository from all configured organizations (with confirmation)") flag.Parse() |
