All Contributors

All Contributors

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

›CLI

规范

  • 概览
  • 规范
  • Emoji键 ✨
  • 仓库维护人员
  • 工具

@all-contributors Bot 🤖

  • 概览
  • 安装
  • 用法
  • 配置
  • FAQs

CLI

  • 概览
  • 安装
  • 用法
  • 配置

项目

  • 帮助我们改进
  • 行为准则
  • 如何实现?
Edit

CLI用法

此使用文档假定了你已经遵循cli installation steps。

贴士:以下我们将展示all-contributors来保持简单,但是如果你有任何困难,请尝试yarn all-contributors。

命令

  • all-contributors init
  • all-contributors add
  • all-contributors check
  • all-contributors generate

all-contributors init

当你第一次使用all-contributors-cli的话,请运行此命令。 此命令会询问一些问题,并且all-contributors设置项目。 此设置包括了创建一个.all-contributorsrc配置文件和在规定的files中创建贡献者列表 (通常在你的README.md)。

all-contributors add

使用add在你的项目中添加新的贡献者,或者添加新的贡献方式。 它们会被添加到你的配置文件,并且如果你使用generate command,贡献者文件将会被更新。

# 添加新的贡献者 <用户名>, 和贡献类型 <贡献>
all-contributors add <username> <contribution>
# 范例:
all-contributors add jfmengels code,doc

用户名是用户GitHub或者GitLab的用户名,贡献是一个以,分隔的贡献列表。 通过表情符号键 (贡献类型引用)查看一系列有效的贡献类型。

GitLab用户:请查看GitLab用户额外规定。

all-contributors check

Use check to compare contributors from GitHub with the ones credited in your .all-contributorsrc file, to make sure that credit is given where it's due.

由于GitHub API限制,此命令只适用于少于500名贡献者的项目(除非你设置below in GitHub users中提及的PRIVATE_TOKEN)

all-contributors generate

使用generate从你的.all-contributorsrc文件中读取贡献者列表,并且在指定的files键中更新贡献者表格。

Please note the command must be able to find the following tags in those files, to update the table:

<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- ALL-CONTRIBUTORS-LIST:END -->

Also, note that it needs to find the following tags to update the badge:

<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
<!-- ALL-CONTRIBUTORS-BADGE:END -->

GitHub用户

在某些情况下,你可能会看到错误消息GitHub API rate limit exceeded for xxx。 You may need to set an environment variable named PRIVATE_TOKEN to circumvent this GitHub rate limit.

Private token is your Personal Access Token (PAT) to authenticate with the GitHub API.

GitLab用户

Please note that if you are using a self-hosted GitLab instance, some commands will need you to set an environment variable named PRIVATE_TOKEN first.

Private token是你使用GitLab API进行身份验证的私人访问令牌。

# set private token on Linux
export PRIVATE_TOKEN=your_private_token
# set private token on Windows
set PRIVATE_TOKEN=your_private_token

接下来呢?

  • 配置CLI
← 安装配置 →
  • 命令
    • all-contributors init
    • all-contributors add
    • all-contributors check
    • all-contributors generate
  • GitHub用户
  • GitLab用户
  • 接下来呢?
All Contributors