summaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2025-07-13 22:24:16 +0300
committerPaul Buetow <paul@buetow.org>2025-07-13 22:25:41 +0300
commit09a333cdc72186d95c28933d15035f405e0d4ea9 (patch)
tree1599080ccb0e6df61f7990ff93f9a5edb615ebfd /internal
parent864d087d279eb7073811cb76fc2b2b2f571f8394 (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>
Diffstat (limited to 'internal')
-rw-r--r--internal/cmd/release.go18
-rw-r--r--internal/cmd/sync.go11
2 files changed, 18 insertions, 11 deletions
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