fix: disable Claude co-author attribution by default (#2758)

* fix: disable Claude co-author attribution by default

* fix: harden default co-author opt-out and correct the docs

Follow-up on the co-author default in this PR.

- Remove the existsSync/writeFileSync race in the installer settings write
  (CodeQL js/file-system-race, high). A single guarded read now covers the
  fresh-install case, and unreadable or non-object settings are left untouched.
- Respect `attribution` as an explicit user choice. It supersedes
  `includeCoAuthoredBy` in Claude Code 2.1.x, so a user who configured it would
  otherwise have had a dead key written into their settings.
- Share one opt-out rule via scripts/lib/claude-commit-attribution.js instead of
  duplicating it across the installer and plugin setup.
- Update the git-workflow rule and its nine mirrors and translations, which
  still told users ECC does not ship this setting.

We keep writing the deprecated `includeCoAuthoredBy` key rather than
`attribution`: unknown keys fail Claude Code settings validation, so writing
`attribution` would break users on older versions.
This commit is contained in:
haelyra
2026-08-12 00:43:58 -04:00
committed by GitHub
parent ff2280a318
commit 569b1d5b32
18 changed files with 398 additions and 38 deletions
+1 -1
View File
@@ -9,7 +9,7 @@
Tipos: feat, fix, refactor, docs, test, chore, perf, ci
Nota: Para desactivar la atribución de coautoría, configure `"includeCoAuthoredBy": false` en `~/.claude/settings.json`; Claude Code agrega `Co-Authored-By` de forma predeterminada y ECC no incluye esta configuración.
Nota: Las instalaciones gestionadas por ECC configuran `"includeCoAuthoredBy": false` en `~/.claude/settings.json`, por lo que los commits no incluyen `Co-Authored-By` de forma predeterminada. Para conservar la atribución de Claude, configure `"includeCoAuthoredBy": true` o `attribution`; ECC nunca sobrescribe una elección explícita.
## Flujo de Trabajo de Pull Request
+1 -1
View File
@@ -10,7 +10,7 @@
タイプ: feat, fix, refactor, docs, test, chore, perf, ci
注記: コミットの共同作成者の属性を無効にするには、`~/.claude/settings.json``"includeCoAuthoredBy": false` を設定します。Claude Code は既定で `Co-Authored-By` を付与し、ECC はこの設定を同梱しません。
注記: ECC が管理するインストールは `~/.claude/settings.json``"includeCoAuthoredBy": false` を設定するため、コミットには既定で `Co-Authored-By` が付きません。Claude の属性を残す場合は `"includeCoAuthoredBy": true` または `attribution` を設定してください。ECC は明示的な設定を上書きしません。
## Pull Request ワークフロー
+1 -1
View File
@@ -9,7 +9,7 @@
타입: feat, fix, refactor, docs, test, chore, perf, ci
참고: 공동 작성자 표기를 비활성화하려면 `~/.claude/settings.json``"includeCoAuthoredBy": false`를 설정하세요. Claude Code는 기본적으로 `Co-Authored-By`를 추가하며 ECC는 이 설정을 포함하지 않습니다.
참고: ECC가 관리하는 설치는 `~/.claude/settings.json``"includeCoAuthoredBy": false`를 설정하므로 커밋에 기본적으로 `Co-Authored-By`가 붙지 않습니다. Claude 표기를 유지하려면 `"includeCoAuthoredBy": true`를 설정하거나 `attribution`을 구성하세요. ECC는 명시적인 선택을 덮어쓰지 않습니다.
## Pull Request 워크플로우
+1 -1
View File
@@ -9,7 +9,7 @@
Tipos: feat, fix, refactor, docs, test, chore, perf, ci
Nota: Para desativar a atribuição de coautoria, defina `"includeCoAuthoredBy": false` em `~/.claude/settings.json`; o Claude Code adiciona `Co-Authored-By` por padrão e o ECC não inclui essa configuração.
Nota: As instalações gerenciadas pelo ECC definem `"includeCoAuthoredBy": false` em `~/.claude/settings.json`, portanto os commits não incluem `Co-Authored-By` por padrão. Para manter a atribuição do Claude, defina `"includeCoAuthoredBy": true` ou configure `attribution`; o ECC nunca sobrescreve uma escolha explícita.
## Fluxo de Trabalho de Pull Request
+1 -1
View File
@@ -9,7 +9,7 @@
Types: feat, fix, refactor, docs, test, chore, perf, ci
Not: Ortak yazar atfını devre dışı bırakmak için `~/.claude/settings.json` içinde `"includeCoAuthoredBy": false` ayarlayın; Claude Code varsayılan olarak `Co-Authored-By` ekler ve ECC bu ayarı içermez.
Not: ECC tarafından yönetilen kurulumlar `~/.claude/settings.json` içinde `"includeCoAuthoredBy": false` ayarlar, bu nedenle commitler varsayılan olarak `Co-Authored-By` içermez. Claude atfını korumak için `"includeCoAuthoredBy": true` veya `attribution` ayarlayın; ECC açık bir tercihin üzerine asla yazmaz.
## Pull Request İş Akışı
+1 -1
View File
@@ -10,7 +10,7 @@
类型:feat, fix, refactor, docs, test, chore, perf, ci
注意:若要禁用共同作者归因,请`~/.claude/settings.json` 中设置 `"includeCoAuthoredBy": false`Claude Code 默认会附加 `Co-Authored-By`,而 ECC 不会附带此设置
注意:ECC 管理的安装会`~/.claude/settings.json` 中设置 `"includeCoAuthoredBy": false`,因此提交默认不带 `Co-Authored-By`。若要保留 Claude 的归因,请设置 `"includeCoAuthoredBy": true` 或配置 `attribution`ECC 不会覆盖用户的显式选择
## 拉取请求工作流程
+1 -1
View File
@@ -10,7 +10,7 @@
類型:feat、fix、refactor、docs、test、chore、perf、ci
注意:若要停用共同作者歸屬,請`~/.claude/settings.json` 中設定 `"includeCoAuthoredBy": false`Claude Code 預設會附加 `Co-Authored-By`,而 ECC 不會隨附這個設定
注意:ECC 管理的安裝會`~/.claude/settings.json` 中設定 `"includeCoAuthoredBy": false`,因此提交預設不會附帶 `Co-Authored-By`。若要保留 Claude 的歸屬,請設定 `"includeCoAuthoredBy": true` 或設定 `attribution`ECC 不會覆寫使用者的明確選擇
## Pull Request 工作流程