All Contributors

All Contributors

  • Документация
  • GitHub
  • Languages iconРусский
    • English
    • 日本語
    • Deutsch
    • Español
    • Français
    • Bahasa Indonesia
    • 한국어
    • Polski
    • Português (Brasil)
    • 中文

›@all-contributors Бот 🤖

Спецификация

  • Обзор
  • Спецификация
  • Emoji Ключ ✨
  • Repository Maintainers
  • Инструменты

@all-contributors Бот 🤖

  • Обзор
  • Установка
  • Использование
  • Конфигурация
  • FAQs

CLI

  • Обзор
  • Установка
  • Использование
  • Конфигурация

Проект

  • Помогите нам улучшить
  • Кодекс поведения
  • Кто этим пользуется?
Edit

Конфигурация бота

Вы можете настроить поведение all-contributors бота, обновив .all-contributorsrc JSON файл. 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.

Вы просматриваете 🤖 Конфигурацию Бота, аналогичную CLI конфигурации

Ниже приведены ключи, которые можно задать:

ОпцияОписаниеПример/По-умолчанию
projectNameОбязательно, имя проекта.Пример: all-contributors-cli
projectOwnerОбязательно, имя пользователя, на котором размещается проект.Example: tenshiAMD
repoTypeТип репозитория. Должно быть github или gitlab.По умолчанию: github
repoHostУказывает имя хоста репозитория. Измените его, если вы используете собственный репозиторий.По умолчанию: https://github.com если repoType является github, и https://gitlab.com если repoType является gitlab
filesМассив файлов для обновления.По умолчанию: ['README.md']
imageSizeРазмер аватара пользователя (в пикселях).По умолчанию: 100
commitАвтоматически коммитить значек (badge) при добавлении участников.Default: false
commitConventionCommit convention (angular, atom, ember, eslint, jshint, gitmoji, or none).Default: angular
contributorsPerLineМаксимальное количество столбцов для таблицы участников.По умолчанию: 7
contributorsSortAlphabeticallytrue: Sort alphabetically. false: Display in order of addition.Default: false
badgeTemplateУстанавливает пользовательский шаблон lodash для генерации значка.
contributorTemplateУстанавливает пользовательский шаблон lodash для генерации участника.
wrapperTemplateDefine your own lodash template to wrap the list of contributors
typesУказывает пользовательские символы или шаблоны ссылок для типов вкладов. Может переопределять документированные типы.
linkToUsageAdds a footer with link to usage (either true or false)Default: true
skipCiMakes the CI ignore the commit. (either true or false)Default: true
contributorsСписок участников этого проекта, обновляется при @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": []
}

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 which can be found in this guide.

  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.

← ИспользованиеFAQs →
All Contributors