all-contributors / all-contributors/allcontributors.org

Default contributorsSortAlphabetically to whether existing contributors are already sorted alphabetically

Open
#809 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
MDX
Stars
8.1k
Forks
1.7k
Avg merge
17h 1m
Merged PRs (30d)
6

Description

**Is your feature request related to a problem? Please describe.**

Right now, `contributorsSortAlphabetically` defaults to `false` per the [CLI and bot configuration in .all-contributorsrc](https://allcontributors.org/docs/en/bot/configuration). That means contributors are displayed in order of addition.

It would be nice if this was inferred automatically _if_ `contributors` already exist. That way repositories that want it enabled could reduce the size of their `.all-contributorsrc` file.

**Describe the solution you'd like**

I think this would need to be implemented in two areas:

* Default inference: it would be detected as `true` if and only if...
* `contributors.length > 1`
* They're sorted in alphabetical order
* They're not also coincidentally sorted in order of addition
* Enabling the option: adding a new command like `npx all-contributors-cli sort "addition"|"alphabetically"` that will sort the `contributors` without an explicit `contributorsSortAlphabetically` config line

**Describe alternatives you've considered**

🤷

**Additional context**

This comes from a similar drive to #808. I think this ties into a general trend of "config file fatigue". A lot of users find it exhausting and overwhelming to open a new repository with config files that have a lot of settings in them. I think anything we can do to reduce the complexity of config files in a repository is helpful. ❤️

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.