on main help sign in
chore(attribution): default to assisted-by + email (#1444)
9d70d1dAmolith
README.md+8−5
@@ -374,11 +374,14 @@ it creates. You can customize this behavior with the `attribution` option:
374}
374}
375```
375```
376
376
377−- `trailer_style`: Controls the attribution trailer added to commit messages (default: `co-authored-by`)
377+- `trailer_style`: Controls the attribution trailer added to commit messages
378− - `co-authored-by`: Adds `Co-Authored-By: Crush <crush@charm.land>`
378+ (default: `assisted-by`)
379− - `assisted-by`: Adds `Assisted-by: [Model Name] via Crush` (includes the model name)
379+ - `assisted-by`: Adds `Assisted-by: [Model Name] via Crush <crush@charm.land>`
380+ (includes the model name)
381+ - `co-authored-by`: Adds `Co-Authored-By: Crush <crush@charm.land>`
380− - `none`: No attribution trailer
382+ - `none`: No attribution trailer
381−- `generated_with`: When true (default), adds `💘 Generated with Crush` line to commit messages and PR descriptions
383+- `generated_with`: When true (default), adds `💘 Generated with Crush` line to
384+ commit messages and PR descriptions
382
385
383### Custom Providers
386### Custom Providers
384
387
internal/agent/tools/bash.tpl+1−1
@@ -69,7 +69,7 @@ When user asks to create git commit:
69{{ end}}
69{{ end}}
70{{if eq .Attribution.TrailerStyle "assisted-by" }}
70{{if eq .Attribution.TrailerStyle "assisted-by" }}
71
71
72− Assisted-by: {{ .ModelName }} via Crush
72+ Assisted-by: {{ .ModelName }} via Crush <crush@charm.land>
73{{ else if eq .Attribution.TrailerStyle "co-authored-by" }}
73{{ else if eq .Attribution.TrailerStyle "co-authored-by" }}
74
74
75 Co-Authored-By: Crush <crush@charm.land>
75 Co-Authored-By: Crush <crush@charm.land>
internal/config/attribution_migration_test.go+2−2
@@ -66,7 +66,7 @@ func TestAttributionMigration(t *testing.T) {
66 }
66 }
67 }
67 }
68 }`,
68 }`,
69− expectedTrailer: TrailerStyleCoAuthoredBy,
69+ expectedTrailer: TrailerStyleAssistedBy,
70 expectedGenerate: true,
70 expectedGenerate: true,
71 },
71 },
72 {
72 {
@@ -74,7 +74,7 @@ func TestAttributionMigration(t *testing.T) {
74 configJSON: `{
74 configJSON: `{
75 "options": {}
75 "options": {}
76 }`,
76 }`,
77− expectedTrailer: TrailerStyleCoAuthoredBy,
77+ expectedTrailer: TrailerStyleAssistedBy,
78 expectedGenerate: true,
78 expectedGenerate: true,
79 },
79 },
80 }
80 }
internal/config/config.go+1−1
@@ -177,7 +177,7 @@ const (
177)
177)
178
178
179type Attribution struct {
179type Attribution struct {
180− TrailerStyle TrailerStyle `json:"trailer_style,omitempty" jsonschema:"description=Style of attribution trailer to add to commits,enum=none,enum=co-authored-by,enum=assisted-by,default=co-authored-by"`
180+ TrailerStyle TrailerStyle `json:"trailer_style,omitempty" jsonschema:"description=Style of attribution trailer to add to commits,enum=none,enum=co-authored-by,enum=assisted-by,default=assisted-by"`
181 CoAuthoredBy *bool `json:"co_authored_by,omitempty" jsonschema:"description=Deprecated: use trailer_style instead"`
181 CoAuthoredBy *bool `json:"co_authored_by,omitempty" jsonschema:"description=Deprecated: use trailer_style instead"`
182 GeneratedWith bool `json:"generated_with,omitempty" jsonschema:"description=Add Generated with Crush line to commit messages and issues and PRs,default=true"`
182 GeneratedWith bool `json:"generated_with,omitempty" jsonschema:"description=Add Generated with Crush line to commit messages and issues and PRs,default=true"`
183}
183}
internal/config/load.go+8−4
@@ -353,15 +353,19 @@ func (c *Config) setDefaults(workingDir, dataDir string) {
353
353
354 if c.Options.Attribution == nil {
354 if c.Options.Attribution == nil {
355 c.Options.Attribution = &Attribution{
355 c.Options.Attribution = &Attribution{
356− TrailerStyle: TrailerStyleCoAuthoredBy,
356+ TrailerStyle: TrailerStyleAssistedBy,
357 GeneratedWith: true,
357 GeneratedWith: true,
358 }
358 }
359 } else if c.Options.Attribution.TrailerStyle == "" {
359 } else if c.Options.Attribution.TrailerStyle == "" {
360 // Migrate deprecated co_authored_by or apply default
360 // Migrate deprecated co_authored_by or apply default
361− if c.Options.Attribution.CoAuthoredBy != nil && !*c.Options.Attribution.CoAuthoredBy {
361+ if c.Options.Attribution.CoAuthoredBy != nil {
362+ if *c.Options.Attribution.CoAuthoredBy {
363+ c.Options.Attribution.TrailerStyle = TrailerStyleCoAuthoredBy
364+ } else {
362− c.Options.Attribution.TrailerStyle = TrailerStyleNone
365+ c.Options.Attribution.TrailerStyle = TrailerStyleNone
366+ }
363 } else {
367 } else {
364− c.Options.Attribution.TrailerStyle = TrailerStyleCoAuthoredBy
368+ c.Options.Attribution.TrailerStyle = TrailerStyleAssistedBy
365 }
369 }
366 }
370 }
367 if c.Options.InitializeAs == "" {
371 if c.Options.InitializeAs == "" {
schema.json+1−1
@@ -13,7 +13,7 @@
13 "assisted-by"
13 "assisted-by"
14 ],
14 ],
15 "description": "Style of attribution trailer to add to commits",
15 "description": "Style of attribution trailer to add to commits",
16− "default": "co-authored-by"
16+ "default": "assisted-by"
17 },
17 },
18 "co_authored_by": {
18 "co_authored_by": {
19 "type": "boolean",
19 "type": "boolean",