diff options
| author | Paul Buetow <paul@buetow.org> | 2025-07-13 22:24:16 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2025-07-13 22:25:41 +0300 |
| commit | 09a333cdc72186d95c28933d15035f405e0d4ea9 (patch) | |
| tree | 1599080ccb0e6df61f7990ff93f9a5edb615ebfd | |
| parent | 864d087d279eb7073811cb76fc2b2b2f571f8394 (diff) | |
feat: make AI release notes the default behavior
- AI-generated release notes are now enabled by default
- Add --no-ai-release-notes flag to disable AI notes
- Update all documentation and examples to reflect new default
- Works for both sync commands and release commands
Users now get AI-generated release notes automatically:
gitsyncer sync repo myproject # AI notes enabled
gitsyncer sync repo myproject --no-ai-release-notes # Disable AI
gitsyncer release create # AI notes enabled
gitsyncer release create --no-ai-notes # Disable AI
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
| -rw-r--r-- | CLAUDE.md | 6 | ||||
| -rw-r--r-- | README.md | 18 | ||||
| -rw-r--r-- | internal/cmd/release.go | 18 | ||||
| -rw-r--r-- | internal/cmd/sync.go | 11 |
4 files changed, 34 insertions, 19 deletions
@@ -41,9 +41,11 @@ gitsyncer release check # Disable automatic release checking during sync operations gitsyncer sync all --no-releases -# Automatically create releases without confirmation prompts +# Automatically create releases without confirmation prompts (AI notes enabled by default) gitsyncer release create --auto -gitsyncer release create --auto --ai-notes + +# Create releases without AI notes +gitsyncer release create --auto --no-ai-notes ``` Note: Release checking is enabled by default after sync operations. It will check for version tags (formats: vX.Y.Z, vX.Y, vX, X.Y.Z, X.Y, X) that don't have corresponding releases on GitHub/Codeberg and prompt for confirmation before creating them. @@ -96,6 +96,12 @@ gitsyncer sync repo myproject --backup # Preview what would be synced gitsyncer sync repo myproject --dry-run + +# Sync without AI-generated release notes +gitsyncer sync repo myproject --no-ai-release-notes + +# Auto-create releases without prompts (AI notes enabled by default) +gitsyncer sync repo myproject --auto-create-releases ``` #### Sync all configured repositories @@ -152,20 +158,20 @@ gitsyncer release check myproject #### Create releases ```bash -# Create releases with confirmation prompts +# Create releases with confirmation prompts (AI notes enabled by default) gitsyncer release create # Auto-create without prompts gitsyncer release create --auto -# Create with AI-generated notes -gitsyncer release create --ai-notes +# Create without AI-generated notes +gitsyncer release create --no-ai-notes # Update existing releases with AI notes -gitsyncer release create --update-existing --ai-notes +gitsyncer release create --update-existing -# Create for specific repository -gitsyncer release create myproject --ai-notes +# Create for specific repository without AI +gitsyncer release create myproject --no-ai-notes ``` ### Project Showcase diff --git a/internal/cmd/release.go b/internal/cmd/release.go index e7ce80a..f05005a 100644 --- a/internal/cmd/release.go +++ b/internal/cmd/release.go @@ -9,7 +9,7 @@ import ( var ( autoRelease bool - aiNotes bool + noAINotes bool updateExisting bool templatePath string ) @@ -57,25 +57,25 @@ var releaseCreateCmd = &cobra.Command{ Long: `Create releases for version tags that don't have them. If no repository is specified, processes all configured repositories.`, Args: cobra.MaximumNArgs(1), - Example: ` # Create releases with confirmation prompts + Example: ` # Create releases (AI notes enabled by default) gitsyncer release create # Auto-create without prompts gitsyncer release create --auto - # Create with AI-generated notes - gitsyncer release create --ai-notes + # Create without AI-generated notes + gitsyncer release create --no-ai-notes # Update existing releases with AI notes - gitsyncer release create --update-existing --ai-notes + gitsyncer release create --update-existing - # Create for specific repository - gitsyncer release create myproject --ai-notes`, + # Create for specific repository without AI + gitsyncer release create myproject --no-ai-notes`, Run: func(cmd *cobra.Command, args []string) { flags := buildFlags() flags.CheckReleases = true flags.AutoCreateReleases = autoRelease - flags.AIReleaseNotes = aiNotes + flags.AIReleaseNotes = !noAINotes flags.UpdateReleases = updateExisting if len(args) > 0 { @@ -100,7 +100,7 @@ func init() { // Create-specific flags releaseCreateCmd.Flags().BoolVar(&autoRelease, "auto", false, "skip confirmation prompts") - releaseCreateCmd.Flags().BoolVar(&aiNotes, "ai-notes", false, "generate release notes using Claude AI based on git diff") + releaseCreateCmd.Flags().BoolVar(&noAINotes, "no-ai-notes", false, "disable AI-generated release notes (AI notes are enabled by default)") releaseCreateCmd.Flags().BoolVar(&updateExisting, "update-existing", false, "update existing releases with new AI-generated notes") releaseCreateCmd.Flags().StringVar(&templatePath, "template", "", "custom template for release notes") }
\ No newline at end of file diff --git a/internal/cmd/sync.go b/internal/cmd/sync.go index ad67178..9efa432 100644 --- a/internal/cmd/sync.go +++ b/internal/cmd/sync.go @@ -13,6 +13,7 @@ var ( createRepos bool noReleases bool autoCreate bool + noAIReleaseNotes bool ) var syncCmd = &cobra.Command{ @@ -28,14 +29,17 @@ var syncRepoCmd = &cobra.Command{ Short: "Sync a specific repository", Long: `Synchronize a specific repository across all configured organizations.`, Args: cobra.ExactArgs(1), - Example: ` # Sync a single repository + Example: ` # Sync a single repository (AI release notes enabled by default) gitsyncer sync repo myproject # Sync with backup locations gitsyncer sync repo myproject --backup # Preview what would be synced - gitsyncer sync repo myproject --dry-run`, + gitsyncer sync repo myproject --dry-run + + # Sync without AI-generated release notes + gitsyncer sync repo myproject --no-ai-release-notes`, Run: func(cmd *cobra.Command, args []string) { flags := buildFlags() flags.SyncRepo = args[0] @@ -179,6 +183,8 @@ func init() { syncCmd.PersistentFlags().BoolVar(&backup, "backup", false, "include backup locations") syncCmd.PersistentFlags().BoolVar(&createRepos, "create-repos", false, "auto-create missing repositories") syncCmd.PersistentFlags().BoolVar(&noReleases, "no-releases", false, "skip release checking after sync") + syncCmd.PersistentFlags().BoolVar(&autoCreate, "auto-create-releases", false, "automatically create releases without confirmation") + syncCmd.PersistentFlags().BoolVar(&noAIReleaseNotes, "no-ai-release-notes", false, "disable AI-generated release notes (AI notes are enabled by default)") } func buildFlags() *cli.Flags { @@ -189,5 +195,6 @@ func buildFlags() *cli.Flags { Backup: backup, NoCheckReleases: noReleases, AutoCreateReleases: autoCreate, + AIReleaseNotes: !noAIReleaseNotes, } }
\ No newline at end of file |
