all-contributors / all-contributors/allcontributors.org
Default badgeTemplate to what's in the README.md already
- Lingua principale
- MDX
- Stelle
- 8.1k
- Fork
- 1.7k
- Merge medio
- 17h 1m
- PR unite (30g)
- 6
Descrizione
**Is your feature request related to a problem? Please describe.**
Right now, customizations to the `badgeTemplate` format are allowed in the [CLI and bot configuration in .all-contributorsrc](https://allcontributors.org/docs/en/bot/configuration). Which is great and I have explicitly configured in all my repositories, thanks for that!
It would be nice if this was inferred automatically _if_ README.md already exists and has a matching `` section. That way repositories that want it enabled could reduce the size of their `.all-contributorsrc` file.
**Describe the solution you'd like**
I think its default value should be changed so that:
1. If the `README.md` file's `` contents can have a badge template string inferred, that string is used
2. Otherwise the default template is used
I don't think the heuristic for matching to a badge template string needs to be exceedingly complex. Most repositories I've seen don't do much more than include a `<%= contributors.length %>` or two. So I'd say, if it's possible to substitute in `contributors.length` for digit groups inside the badge, that could be the heuristic. It could match something like `All Contributors: 12` but not a larger digits group like `color:#123456`.
**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. ❤️
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.