Redundant commitConvention and repoType added to .all-contributorsrc file on add

已关闭
#369 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@lwasser 已经在做这个了。

开始于 2026年10月27日。

  • #542 来自 @JoshuaKGoldberg —— 已合并
  • #546 来自 @matbrgz —— 已关闭,未合并
  • #585 来自 @lwasser —— 未关闭

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
45/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
停滞
技术栈
javascript
领域
cli

调研方向

首先使用一个最小的 .all-contributorsrc 和 npx all-contributors-cli add JoshuaKGoldberg doc 重现该问题。跟踪 add 命令的配置更新路径,并检查文档中所述的默认值是如何写入的。完成的标准是:不包含这些属性的现有文件在执行命令后保持不变,并且为该重现用例提供覆盖率。

由索引模型根据 Issue 内容生成。

描述

type: bug

Describe the bug

.all-contributorsrc files shouldn't need to include commitConvention or repoType properties. They both have default values as documented on https://allcontributors.org/docs/en/bot/configuration:

  • commitConvention: "angular"
  • repoType: "github"

But, running npx all-contributors-cli add ... is adding commitConvention or repoType properties with their default values to .all-contributorsrc files that don't have them explicitly.

 {
 	"contributors": [ ... ],
 	"projectName": "repros-example",
 	"projectOwner": "JoshuaKGoldberg",
+	"repoType": "github",
+	"commitConvention": "angular"
 }

To Reproduce

See https://github.com/JoshuaKGoldberg/repros/tree/all-contributors-cli-add-field-defaults.

  1. Create a repo with a minimal .all-contributorsrc
  2. Run npx all-contributors-cli add JoshuaKGoldberg doc

Expected behavior

The .all-contributorsrc file shouldn't have commitConvention or repoType added, since they have documented defaults.

Additional context

I filed a bunch of feature requests over on https://github.com/all-contributors/all-contributors for more default-friendly behavior. https://github.com/all-contributors/all-contributors/issues/808 is something of a hub for them.

主要语言
JavaScript
星标
425
派生
152
平均合并
1 天 6 小时
30 天内合并 PR
17

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

all-contributors/cli 的其他 Issue

查看 all-contributors/cli 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。