all-contributors / all-contributors/cli

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

未关闭
#369 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
type: bug
主要语言
JavaScript
星标
425
派生
149
PR 合并指标
30 天内没有已合并 PR

描述

**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.

```diff
{
"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.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

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