Bot Konfiguration
You can configure the all-contributors bot behaviour by updating the .all-contributorsrc JSON file.
The data used to generate the contributors list will be stored there, and you
can configure how you want @all-contributors to generate the list.
You are viewing the 🤖Bot Configuration, which is similar to the CLI Configuration
Dies sind die Schlüssel, die Du angeben kannst:
| Option | Beschreibung | Beispiel/Standard Wert |
|---|---|---|
projectName | Name des Projekt (erforderlich) | Example: all-contributors-cli |
projectOwner | Der Name des Users der das Projekt hostet ist erforderlich. | Example: tenshiAMD |
repoType | Typ des Repositories. Must be either github or gitlab. | Default: github |
repoHost | Verweist auf den Repository-Hostnamen. Ändere es, wenn Du ein selbst gehostetes Repository verwendest. | Default: https://github.com if repoType is github, and https://gitlab.com if repoType is gitlab |
files | Liste von Dateien die aktualisiert werden sollen. | Default: ['README.md'] |
imageSize | Größe (in px) des User Avatar. | Default: 100 |
commit | Soll der Badge automatisch aktualisiert werden, wenn neue Mitwirkende hinzugefügt werden. | Default: false |
commitConvention | Commit convention (angular, atom, or none). | Default: angular |
contributorsPerLine | Maximale Anzahl von Spalten für die Tabelle der Mitwirkenden. | Default: 7 |
contributorsSortAlphabetically | true: Sort alphabetically. false: Display in order of addition. | Default: false |
badgeTemplate | Definiere Deine eigene lodash Vorlage um den Batch erstellen zu lassen. | |
contributorTemplate | Definiere Deine eigene lodash Vorlage um die Mitwirkenden auf der Liste erstellen zu lassen. | |
wrapperTemplate | Define your own lodash template to wrap the list of contributors | |
types | Definiere benutzerdefinierte Symbole oder verknüpfe Beitragstypen Vorlagen. Kann die dokumentierten Typen überschreiben. | |
linkToUsage | Adds a footer with link to usage (either true or false) | Default: true |
skipCi | Lässt die CI den Commit ignorieren. (either true or false) | Default: true |
contributors | List of contributors for this project, this is updated by @all-contributors add |
{ "projectName": "all-contributors", "projectOwner": "all-contributors", "repoType": "github", "repoHost": "https://github.com", "files": ["README.md"], "imageSize": 100, "commit": false, "contributorsPerLine": 7, "contributorsSortAlphabetically": false, "badgeTemplate": "[](#contributors)", "contributorTemplate": "<a href=\"<%= contributor.profile %>\"><img src=\"<%= contributor.avatar_url %>\" width=\"<%= options.imageSize %>px;\" alt=\"\"/><br /><sub><b><%= contributor.name %></b></sub></a>", "wrapperTemplate": "\n<table>\n <tbody><%= bodyContent %> </tbody>\n<%= tableFooterContent %></table>\n\n", "types": { "custom": { "symbol": "🔭", "description": "A custom contribution type.", "link": "[<%= symbol %>](<%= url %> \"<%= description %>\")," } }, "linkToUsage": true, "skipCi": true, "contributors": []}Moving the All Contributors table into a different file
Abschnitt betitelt „Moving the All Contributors table into a different file“As you know, the default file for the contributors table is README.md. But if your project has tons of contributors, it doesn’t make sense to include the All Contributors table in the README.md file. Instead, you can use a different file to do so.
Here are the steps that may help you in achieving that. For the sake of this tutorial, the different file that we’ll use is going to be named CONTRIBUTORS.md.
-
Install the bot. See the Installation page for instructions.
-
Add your first contributor. See the Bot Usage page for instructions.
-
Create the
CONTRIBUTORS.mdfile. -
Copy the code which can be found in this guide.
-
Modify the
fileskey in the.all-contributorsrcJSON file to match your new file name..all-contributorsrc {"files": ["CONTRIBUTORS.md"],...} -
Now you should be good to go. New contributors will be added to this new file instead of the
README.mdfile.
