Skip to content

fix: don't persist default repoType and commitConvention to config file - #542

Draft
JoshuaKGoldberg wants to merge 1 commit into
all-contributors:mainfrom
JoshuaKGoldberg:config-no-persisted-defaults
Draft

JoshuaKGoldberg wants to merge 1 commit into
all-contributors:mainfrom
JoshuaKGoldberg:config-no-persisted-defaults

Conversation

@JoshuaKGoldberg

Copy link
Copy Markdown
Contributor

What: Fixes #369.

Why: repoType and commitConvention have documented defaults, but running add writes them into .all-contributorsrc files that didn't have them.

How: readConfig still applies the defaults for callers, but writeContributors now reads the file without them before writing it back.

Checklist:

  • Documentation N/A
  • Tests
  • Ready to be merged
  • Added myself to contributors table

Fixes all-contributors#369.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@matbrgz

matbrgz commented Sep 27, 2026

Copy link
Copy Markdown

Review from Matheus Breguêz (@matbrgz):

Nice clean fix, @JoshuaKGoldberg! ✨

Keeping redundant default fields (repoType and commitConvention) out of .all-contributorsrc significantly reduces config fatigue. The separation between runtime default resolution in readConfig and clean serialization in writeContributors is elegant and well-tested.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

2 participants