All Contributors

All Contributors

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

›@all-contributors bot 🤖

Especificação

  • Visão geral
  • Especificação
  • Tabela de Emoji ✨
  • Mantenedores de Repositório
  • Ferramentas

@all-contributors bot 🤖

  • Visão geral
  • Instalação
  • Utilização
  • Configuração
  • FAQs

CLI

  • Visão geral
  • Instalação
  • Utilização
  • Configuração

Projeto

  • Ajude a melhorar
  • Código de Conduta
  • Quem está usando?
Edit

Configuração do Bot

Você pode configurar o comportamento do bot de todos-colaboradores, atualizando o arquivo JSON all-contributorsrc. Os dados utilizados para gerar a lista de contribuintes serão armazenados lá dentro, e você pode configurar como você quer @all-contributors para gerar a lista.

Você está visualizando o 🤖Bot de configuração, que é semelhante à Configuração de CLI

Estas são as chaves que pode especificar:

OpçãoDescriçãoExemplo/Padrão
filesLista the arquivos a actualizar.Padrão: ['README.md']
imageSizeTamanho (em px) do avatar do usuário.Padrão: 100
contributorsPerLineNúmero máximo de colunas na tabela de contribuidores.Padrão: 7
contributorsSortAlphabeticallytrue: Sort alphabetically. false: Display in order of addition.Padrão: false
badgeTemplateDefina o próprio modelo de lodash para gerar o badge.
contributorTemplateDefina o próprio modelo de lodash para gerar o contribuidor.
typesEspecificar símbolos personalizados ou modelos de link para os tipos de contribuição. Pode substituir os tipos documentados.
skipCiFaz o CI ignorar o commit. (tanto true ou false)Padrão: true
contributorsLista de contribuidores desse projeto, que é atualizada por @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": "Um tipo de contribuição customizado.",
      "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.

← UtilizaçãoFAQs →
All Contributors