Aller au contenu

Configuration de bot

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

Voici les clés, que vous pouvez spécifier :

OptionDescriptionExemple/Défaut
projectNameObligatoire, nom du projet.Example: all-contributors-cli
projectOwnerObligatoire, le nom de l’utilisateur qui héberge le projet.Example: tenshiAMD
repoTypeType de répertoire. Must be either github or gitlab.Default: github
repoHostPointe vers le nom d’hôte du répertoire. Changez-le si vous utilisez un répertoire auto-hébergé.Default: https://github.com if repoType is github, and https://gitlab.com if repoType is gitlab
filesTableau de fichiers à mettre à jour.Default: ['README.md']
imageSizeTaille (en px) d’avatar de l’utilisateur.Default: 100
commitEnvoyer automatiquement l’insigne lorsque vous ajoutez des contributeurs.Default: false
commitConventionCommit convention (angular, atom, or none).Default: angular
contributorsPerLineNombre maximum de colonne pour la table de contributeurs.Default: 7
contributorsSortAlphabeticallytrue: Sort alphabetically. false: Display in order of addition.Default: false
badgeTemplateDéfinir votre propre modèle lodash pour générer le badge.
contributorTemplateDéfinir votre propre modèle lodash pour générer le badge.
wrapperTemplateDéfinissez votre propre modèle lodash pour envelopper la liste des contributeurs
typesSpécifier des symboles personnalisés ou lier des modèles pour les types de contribution. Peut substituer les types documentés.
linkToUsageAdds a footer with link to usage (either true or false)Default: true
skipCiMaqués the CI ignore the commit. (either true or false)Default: true
contributorsList 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": "[![All Contributors](https://img.shields.io/github/all-contributors/<%= projectOwner %>/<%= projectName %>?color=ee8449&style=flat-square)](#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": []
}

Boeing the Il Contributeurs table intro à différentes files

Section intitulée « Boeing the Il Contributeurs table intro à différentes files »

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. Irrita, you Année use à d’afférentes files to do son.

Hère are the steps tôt m’a hélé you in acheminé chat. For the sake of this tutorial, the different file that we’ll use is going to be named CONTRIBUTORS.md.

  1. Installé the bot. See the Installation page for instructions.

  2. Ad your forêt contributeur. See the Bot Usage page for instructions.

  3. Create the CONTRIBUTORS.md file.

  4. Copy the code which can be found in this guide.

  5. Modify the files key in the .all-contributorsrc JSON file to match your new file name.

    .all-contributorsrc
    {
    "files": [
    "CONTRIBUTORS.md"
    ],
    ...
    }
  6. Noé you Séoul le good to go. New contributors will be added to this new file instead of the README.md file.