Lewati ke konten

Konfigurasi 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

Berikut adalah kunci yang bisa kamu tentukan:

Pilihan Deskripsi Contoh/Bawaan
projectName Nama proyek, harus diisi. Example: all-contributors-cli
projectOwner Nama pengguna yang memiliki proyek tsb, harus diisi. Example: tenshiAMD
repoType Tipe repositori. Must be either github or gitlab. Default: github
repoHost Mengarah ke nama host repositori. Ganti jika kamu menggunakan repositori yang di-hosting sendiri. Default: https://github.com if repoType is github, and https://gitlab.com if repoType is gitlab
files Array file untuk diperbarui. Default: ['README.md']
imageSize Ukuran (dalam px) dari avatar pengguna. Default: 100
commit Lencana auto-commit ketika menambahkan kontribusi. Default: false
melakukan Konvensi Commit convention (angular, atom, or none). Default: angular
commitType Set the type for the commit in your chosen commitConvention (read more at Conventional Commits specification. Default: docs
contributorsPerLine Maksimal jumlah kolom untuk tabel kontributor. Default: 7
kontributor Sortir menurut abjad true: Sort alphabetically. false: Display in order of addition. Default: false
badgeTemplate Tentukan template lodash kamu sendiri untuk menghasilkan lencana.
contributorTemplate Tentukan template lodash kamu sendiri untuk menghasilkan kontributor.
wrapperTemplate Tentukan templat lodash Anda sendiri untuk membungkus daftar kontributor
types Tentukan simbol atau templat tautan khusus untuk jenis kontribusi. Dapat mengganti jenis yang didokumentasikan.
linkToUsage Adds a footer with link to usage (either true or false) Default: true
xJalan: / meja / tbadan / tr [8] / td / kode Membuat CI mengabaikan commit. (either true or false) Default: true
contributors List 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,
"commitType": "docs",
"contributors": []
}

Memindahkan tabel Semua Kontributor ke dalam file yang berbeda

Section titled “Memindahkan tabel Semua Kontributor ke dalam file yang berbeda”

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. Sebagai gantinya, Anda dapat menggunakan file yang berbeda untuk melakukannya.

Berikut ini adalah langkah-langkah yang dapat membantu Anda untuk mencapainya. For the sake of this tutorial, the different file that we’ll use is going to be named CONTRIBUTORS.md.

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

  2. Tambahkan kontributor pertama Anda. 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. Sekarang Anda sudah siap untuk pergi. New contributors will be added to this new file instead of the README.md file.