Using the All Contributors CLI
All Contributors Command Line Interface Commands
Dział zatytułowany „All Contributors Command Line Interface Commands”all-contributors init
Dział zatytułowany „all-contributors init”You can run all-contributors init when you first start using the All Contributors CLI. This command asks you a few questions and then sets up the project to support All Contributors.
npx all-contributors initpnpm dlx all-contributors inityarn dlx all-contributors initThe setup includes creating:
- an
.all-contributorsrcconfiguration file and - a contributor table in the
filesyou specify.
The default file for the contributor table is your README.md.
all-contributors add
Dział zatytułowany „all-contributors add”Use the add command to add:
- new contributors to your project, or
- add new ways in which they have contributed.
For instance, a user may have already contributed code, but after they add a documentation pull request you might want to add them for documentation too. The contributor will be added to your configuration file, and the contributors file will be updated just as if you used the generate command.
# Add new contributor <username>, who made a contribution of type <contribution>npx all-contributors add <username> <contribution># Example:npx all-contributors add jfmengels code,doc# Add new contributor <username>, who made a contribution of type <contribution>pnpm dlx all-contributors add <username> <contribution># Example:pnpm dlx all-contributors add jfmengels code,doc# Add new contributor <username>, who made a contribution of type <contribution>yarn dlx all-contributors add <username> <contribution># Example:yarn dlx all-contributors add jfmengels code,docWhere username is the user’s GitHub or Gitlab username, and contribution is a
,-separated list of contributions. See the Emoji Key (Contribution Types Reference)
for a list of valid contribution types.
all-contributors check
Dział zatytułowany „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.
npx all-contributors checkpnpm dlx all-contributors checkyarn dlx all-contributors checkall-contributors generate
Dział zatytułowany „all-contributors generate”Use generate to read the contributors list from your .all-contributorsrc file
and update the contributor tables specified by the files key.
npx all-contributors generatepnpm dlx all-contributors generateyarn dlx all-contributors generateZwróć uwagę, że musi mieć możliwość znalezienia tagów w odpowiedniej kolejności, aby zaktualizować tabelę:
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --><!-- ALL-CONTRIBUTORS-LIST:END -->Pamiętaj też, że musi znaleźć następujące tagi, aby zaktualizować odznakę:
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section --><!-- ALL-CONTRIBUTORS-BADGE:END -->Użytkownicy GitHuba
Dział zatytułowany „Użytkownicy GitHuba”In some cases you may see the error message GitHub API rate limit exceeded for xxx. You may need to set an environment variable named PRIVATE_TOKEN to circumvent this GitHub rate limit.
Prywatny token to osobisty token dostępu (Personal Access Token - PAT) służący do uwierzytelniania za pomocą interfejsu API GitHub.
Użytkownicy GitLaba
Dział zatytułowany „Użytkownicy GitLaba”Please note that if you are using a self-hosted GitLab instance,
some commands will require you to set an environment variable named PRIVATE_TOKEN first.
# ustaw prywatny token na Linuxexport PRIVATE_TOKEN=your_private_token# ustaw prywatny token na Windowsset PRIVATE_TOKEN=your_private_token