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

Đã đóng
#369 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@lwasser đang làm issue này rồi.

Từ ngày 27/10/2026.

  • #542 của @JoshuaKGoldberg — đã merge
  • #546 của @matbrgz — đã đóng, không merge
  • #585 của @lwasser — đang mở

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
45/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
javascript
Lĩnh vực
cli

Hướng nghiên cứu

Bắt đầu bằng cách tái hiện vấn đề với một .all-contributorsrc tối thiểu và npx all-contributors-cli add JoshuaKGoldberg doc. Theo dõi đường dẫn cập nhật cấu hình của lệnh add và kiểm tra cách các giá trị mặc định được ghi theo tài liệu. Được xem là hoàn thành khi các tệp hiện có không có những thuộc tính này vẫn không thay đổi sau khi chạy lệnh, với coverage cho trường hợp tái hiện.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
JavaScript
Star
425
Fork
152
Merge trung bình
1 ngày 6 giờ
Pull request đã merge (30 ngày)
17

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của all-contributors/cli

Tất cả issue của all-contributors/cli

Issue tương tự

Thêm issue về JavaScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.