All Contributors

All Contributors

  • Dokumentation
  • GitHub
  • Languages iconDeutsch
    • English
    • 日本語
    • Español
    • Français
    • Bahasa Indonesia
    • 한국어
    • Polski
    • Português (Brasil)
    • Русский
    • 中文

›@all-contributors Bot 🤖

Spezifikation

  • Überblick
  • Spezifikation
  • Emoji Key ✨
  • Repository Betreuer
  • Werkzeuge

@all-contributors Bot 🤖

  • Überblick
  • Installation
  • Nutzung
  • Konfiguration
  • FAQs

CLI

  • Überblick
  • Installation
  • Nutzung
  • Konfiguration

Projekt

  • Hilf uns, uns zu verbessern
  • Verhaltenskodex
  • Wer benutzt es?
Edit

Bot Konfiguration

Du kannst das Verhalten des all-contributors Bots konfigurieren, indem du die JSON Datei .all-contributorsrc bearbeitest. Hierin werden die Daten, welche für die Erstellung der Liste der Mitwirkenden benötigt werden, festgelegt. Weiters kann man einstellen wie man von @all-contributors die Liste erstellen lassen möchte.

Du siehst die 🤖Bot Konfiguration, welche ähnlich mit der CLI Konfiguration ist.

Dies sind die Schlüssel, die Du angeben kannst:

OptionBeschreibungBeispiel/Standard Wert
filesListe von Dateien die aktualisiert werden sollen.Standardwert: ['README.md']
imageSizeGröße (in px) des User Avatar.Standardwert: 100
contributorsPerLineMaximale Anzahl von Spalten für die Tabelle der Mitwirkenden.Standardwert: 7
contributorsSortAlphabeticallytrue: Alphabetisch sortieren. false: In Reihenfolge der Beiträge.Default: false
badgeTemplateDefiniere Deine eigene lodash Vorlage um den Batch erstellen zu lassen.
contributorTemplateDefiniere Deine eigene lodash Vorlage um die Mitwirkenden auf der Liste erstellen zu lassen.
typesDefiniere benutzerdefinierte Symbole oder verknüpfe Beitragstypen Vorlagen. Kann die dokumentierten Typen überschreiben.
skipCiLässt die CI den Commit ignorieren. (Entweder true oder false)Standardwert: true
contributorsListe der Mitwirkenden für dieses Projekt, diese wird von @all-contributors aktualisiert
{
  "files": ["README.md"],
  "imageSize": 100,
  "contributorsPerLine": 7,
  "contributorsSortAlphabetically": false,
  "badgeTemplate": "[![All Contributors](https://img.shields.io/badge/all_contributors-<%= contributors.length %>-orange.svg?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>",
  "types": {
    "custom": {
      "symbol": "🔭",
      "description": "A custom contribution type.",
      "link": "[<%= symbol %>](<%= url %> \"<%= description %>\"),"
    }
  },
  "skipCi": "true",
  "contributors": []
}

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.

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

  2. Add your first contributor. See the Bot Usage page for instructions.

  3. Create the CONTRIBUTORS.md file.

  4. Copy the code from the Contributors section in the README.md file, starting at the ALL-CONTRIBUTORS-LIST:START line, and ending at the ALL-CONTRIBUTORS-LIST:END line.

    Example:

    <!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
    <!-- prettier-ignore-start -->
    <!-- markdownlint-disable -->
    <table>
    <tr>
      <td align="center">...</td>
    </tr>
    </table>
    <!-- markdownlint-restore -->
    <!-- prettier-ignore-end -->
    <!-- ALL-CONTRIBUTORS-LIST:END -->
    
  5. Modify the files key in the .all-contributorsrc JSON file to match your new file name.

    {
    "files": [
      "CONTRIBUTORS.md"
    ],
    ...
    }
    
  6. Now you should be good to go. New contributors will be added to this new file instead of the README.md file.

← NutzungFAQs →
All Contributors