All Contributors

All Contributors

  • ドキュメント
  • GitHub
  • Languages icon日本語
    • English
    • Deutsch
    • Español
    • Français
    • Bahasa Indonesia
    • 한국어
    • Polski
    • Português (Brasil)
    • Русский
    • 中文

›@all-contributors ボット 🤖

仕様

  • 概要
  • 仕様
  • Emoji キー ✨
  • リポジトリのメンテナ
  • ツール

@all-contributors ボット 🤖

  • 概要
  • インストール
  • 使い方
  • 設定
  • よくある質問

CLI

  • 概要
  • インストール
  • 使い方
  • 設定

プロジェクト

  • 改善にご協力ください
  • 行動規範
  • 誰が使っているのか?
Edit

ボットの設定

.all-contributorsrc JSON ファイルからall-contributorsボットの設定を変更できます。 コントリビューターリストを生成するためのデータはそのファイルに格納されています。また、all-contributors-cliでどのようにリストを生成するのかの設定も変更できます。

これはボット設定に関するページです。CLI設定をお探しですか?

指定できるキーは以下のとおりです:

オプション説明例/デフォルト
files更新対象のファイル配列デフォルト: ['README.md']
imageSizeユーザーアバターのサイズ (px)デフォルト: 100
contributorsPerLineコントリビューターテーブルの最大カラム数デフォルト: 7
contributorsSortAlphabeticallytrue: Sort alphabetically. false: Display in order of addition.Default: false
badgeTemplateバッジを生成するための独自のlodashテンプレート定義
contributorTemplateコントリビューターを生成するための独自のlodashテンプレート定義
typesコントリビュータータイプのカスタムシンボルかリンクテンプレートの指定。 記述されたタイプを上書き可能
skipCiMakes the CI ignore the commit. (either true or false)Default: true
contributorsプロジェクトのコントリビューターリスト、@all-contributors addで更新される
{
  "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.

← 使い方よくある質問 →
All Contributors