Git Product home page Git Product logo

cli's Introduction

Call for translators! We're looking for translators to help translate this spec for everyone!

Read this documentation in the following languages
한국어 中文 Bahasa Indonesia Deutsch Polski
English Português do Brasil Español Français Русский 日本語

Build Status Crowdin All Contributors Netlify Status Star on GitHub

This is a specification for recognizing contributors to an open-source project in a way that rewards every contribution, not just code.

The basic idea is this:

Use the project README (or another prominent public documentation page in the project) to recognize the contributions of members of the project community.

People are giving themselves and their free time to contribute to open source projects in so many ways, so we believe everyone should be praised for their contributions (code or not).

The All Contributors Table

Below is an example of how using the all-contributors spec table can recognize all contributors

All Contributors Table Screenshot

You can use the @all-contributors bot 🤖 to automate acknowledging contributors to your open source projects

Specification

The specification is detailed on allcontributors.org

Emoji key

The Emoji Key ✨ (and Contribution Types) can be found on allcontributors.org

Contributing

If you've ever wanted to contribute to open source, and a great cause, now is your chance!

See the contributing docs for more information

Contributors ✨

Thanks go to these wonderful people (emoji key):

Kent C. Dodds
Kent C. Dodds

💬 📖 👀 📢
Jeroen Engels
Jeroen Engels

📖 👀 🔧
Jake Bolam
Jake Bolam

📖 🔧 🚇 🚧 👀 💬
Tyler Benning
Tyler Benning

🚧 💻 🎨
Jeff Wen
Jeff Wen

🚧 👀
Maximilian Berkmann
Maximilian Berkmann

🌍 📖 🚧 👀 📢
Matheus Rocha Vieira
Matheus Rocha Vieira

🌍 💻 📖
Robert Lluberes
Robert Lluberes

🌍
이종진
이종진

📖 🌍
Wenqing Xue
Wenqing Xue

🌍
Divjot Singh
Divjot Singh

📖 👀
Ben Briggs
Ben Briggs

📖 👀
James Monger
James Monger

📖
Chris Simpkins
Chris Simpkins

📖 👀
F. Hemberger
F. Hemberger

📖
Daniel Kraft
Daniel Kraft

📖
Mayank Badola
Mayank Badola

📖 🔧
Marco Biedermann
Marco Biedermann

🎨
Itai Steinherz
Itai Steinherz

📖
Patrick Connolly
Patrick Connolly

📖
Nikola Đuza
Nikola Đuza

📖
Demian Dekoninck
Demian Dekoninck

💻
Michael Peyper
Michael Peyper

📖
David Sima
David Sima

📖 🌍
allcontributors[bot]
allcontributors[bot]

📖
Greenkeeper[bot]
Greenkeeper[bot]

🚇
Maryam Pazirandeh
Maryam Pazirandeh

📖
Cassandra Venere
Cassandra Venere

📖
codimiracle
codimiracle

📖
Sung Kim
Sung Kim

🌍 📖
Thomas Brok
Thomas Brok

🌍
robertgrzonka
robertgrzonka

🌍
Megumi Aliya
Megumi Aliya

🌍
Yule
Yule

🌍
Sylvain Pace
Sylvain Pace

🔌
Peter Hürlimann
Peter Hürlimann

🌍
Thiago Delgado Pinto
Thiago Delgado Pinto

🌍
Rogerio Prado de Jesus
Rogerio Prado de Jesus

🌍
Tobias Andersen
Tobias Andersen

🌍
danielbronder
danielbronder

🌍
João Pedro Raskopf
João Pedro Raskopf

🌍
Edwin Vargas
Edwin Vargas

🌍
Faisal KANOUT
Faisal KANOUT

🌍
John Murphy
John Murphy

📖
Kirstie Whitaker
Kirstie Whitaker

🤔
Patryk Peas
Patryk Peas

📖 🌍 💻
Ivan.Nginx
Ivan.Nginx

🌍
levy
levy

📖
nils måsén
nils måsén

📖
Masato Urai (@uraway_)
Masato Urai (@uraway_)

🌍
Kyle Holmberg
Kyle Holmberg

📖
Simon Aronsson
Simon Aronsson

🌍
Cem
Cem

🌍
Jérémie Astor
Jérémie Astor

📖
Rachel M. Carmena
Rachel M. Carmena

🌍
SnO₂WMaN
SnO₂WMaN

📖
César Richard
César Richard

📖 📓
kharaone
kharaone

📖
Mudassar Ali
Mudassar Ali

📖
Andrew Mason
Andrew Mason

📖
Mauro M.
Mauro M.

📖
Nicolas Goutay
Nicolas Goutay

📖
William Entriken
William Entriken

💻
Amine
Amine

📖
Stefano Moia
Stefano Moia

📖
Adam Tuttle
Adam Tuttle

📖
Moni
Moni

🚇
Ilaï Deutel
Ilaï Deutel

📖
Hendrik Brummermann
Hendrik Brummermann

📖
Sang Lostrie
Sang Lostrie

🐛
xinbenlv
xinbenlv

📖
Ivan Paulovich
Ivan Paulovich

📖
Jake Wiesler
Jake Wiesler

📖
Micael Jarniac
Micael Jarniac

🐛
Markus Löning
Markus Löning

📖
Austin Huang
Austin Huang

📖
Nils Andresen
Nils Andresen

📖
LaChapeliere
LaChapeliere

📖
Michal
Michal

🌍
Ali Torki
Ali Torki

📖
Josh Soref
Josh Soref

📖
Taiizor
Taiizor

💻
Ikko Ashimine
Ikko Ashimine

📖
Matthew
Matthew

📖
Cornelius Roemer
Cornelius Roemer

🎨
JohnnySD
JohnnySD

🖋 📖
mwaitzman
mwaitzman

📖
Kenichi Kamiya
Kenichi Kamiya

📖
Angel Aviel Domaoan
Angel Aviel Domaoan

📖 💻 🚧 🐛 👀
Allan Bowe
Allan Bowe

📖
E - Coders (Aasheesh Agarwal)
E - Coders (Aasheesh Agarwal)

📖
Fernando
Fernando

📖
Vedant Mohan Goyal
Vedant Mohan Goyal

📖
Muhammad Hanis Irfan Mohd Zaid
Muhammad Hanis Irfan Mohd Zaid

📖
Abe Hanoka
Abe Hanoka

📖
Roshan Jossy
Roshan Jossy

📖 💻
Sébastien Lavoie
Sébastien Lavoie

🐛
Nicolas Girondi
Nicolas Girondi

🌍
Federico Grandi
Federico Grandi

📖
Henry Bley-Vroman
Henry Bley-Vroman

📖
LBF38
LBF38

📖
Yoon Hyeseong
Yoon Hyeseong

🐛

This project follows the all-contributors specification. Contributions of any kind are welcome!

LICENSE

MIT

cli's People

Contributors

alexjoverm avatar allcontributors[bot] avatar ben-eb avatar berkmann18 avatar bogas04 avatar chinesedfan avatar chrisinajar avatar darekkay avatar favna avatar gantman avatar greenkeeper[bot] avatar hipstersmoothie avatar itaisteinherz avatar jakebolam avatar jamesgeorge007 avatar jfmengels avatar joshuakgoldberg avatar kevinvangelder avatar kirstiejane avatar lachapeliere avatar lucas-c avatar m-zubairahmed avatar machour avatar marceloalves avatar mloning avatar nschonni avatar schweden1997 avatar simon300000 avatar tenshiamd avatar tyler-reitz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cli's Issues

Format like regular JSON

Maybe this is just a personal style thing, but I'd reeeeally like to at least configure this to not reformat my json file with comma-first style.

Happy to make a PR if you could give me some direction.

Add reference to the spec

As noted in the spec, you need to have a reference to the emoji key and the spec itself:

Thanks goes to these wonderful people ([emoji key](https://github.com/kentcdodds/all-contributors#emoji-key)):

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

This project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification.
Contributions of any kind welcome!

Happy to make a PR with some direction

Error: Cannot find module 'all-contributors-cli/cli'

  • all-contributors-cli version: latest
  • node version: v10.6.0
  • npm (or yarn) version: npm v6.2.0

What you did:

I was trying to commit some code related to PR (#95), and the precommit script reported an error. Then I tried npm run add-contributor, got same error. Any clue?

What happened:

image

Incorrect message on add-contributors add

  • all-contributors-cli version: 4.10.0
  • node version:8.9.1
  • npm (or yarn) version:1.3.2

Relevant code or config

yarn add-contributor aravindballa review

What you did:

  • tried adding new user with correct key and user name

What happened:

  1. Added the info to .all-contributorsrc and readme
  2. But shown wrong or misleading output
    image

Reproduction repository:

Problem description:
Incorrect output message

Suggested solution:
Should investigate why it happens and output a successfull message.

Add comment to the output so people know it's generated

In markdown, you can add a comment like so:

<!-- this is a comment in markdown and not rendered -->

It'd be great to add a comment above the output indicating that it's generated and people should not try to modify it directly. Probably direct them to where they can update the contributors (presumably in the rc file if #1 gets supported).

Randomize order of generated contributor list

The problem
Some projects have a lot of contributors. It's no fun to be at the very bottom of the list.

The solution
Allow a cli parameter to generate to turn on shuffling. This will give everyone a chance to shine at the top of the list at some point (probably).

I propose adding the optional "shuffled" keyword after generate. If this seems ok, I can submit a PR for it.

Add an `init` command to generate rc files and a contributors section

In addition to the add command, it would be nice to have an init command that:

  • requests the user for necessary configuration information (repo name, repo owner, contributor file path)
  • Create an rc file
  • Add a ## Contribution section at the end of the contributor file if not available
  • Add enclosing contributors list tags
  • Add enclosing contributors list tags

Wrong contribution type being added to .all-contributorsrc despite the error

If I add a contributor with a non existant contribution type (bar) an error message is printed 👍 but the contribution is still being added to the .all-contributorsrc file 👎

🍺  ~/git-point (master)*$ yarn contributors:add foo bar
$ all-contributors add foo bar
Unknown contribution type bar for contributor foo
error Command failed with exit code 1.
🍺  ~/git-point (master)*$ git diff .all-contributorsrc
diff --git a/.all-contributorsrc b/.all-contributorsrc
index 3dc0ef3..fc4dee2 100644
--- a/.all-contributorsrc
+++ b/.all-contributorsrc
@@ -635,6 +635,15 @@
       "avatar_url": "https://avatars0.githubusercontent.com/u/3683673?v=4",
       "profile": "https://thecodetalker.github.io/",
       "contributions": []
+    },
+    {
+      "login": "foo",
+      "name": "Foo Bar",
+      "avatar_url": "https://avatars0.githubusercontent.com/u/333184?v=4",
+      "profile": "http://dblp2.uni-trier.de/pers/hd/p/Foo:Bar",
+      "contributions": [
+        "bar"
+      ]
     }
   ]
 }

What should happen is:

  • wrong contributions type being reported and not written in
  • if all contributions types were wrong, the user shouldn't be added in the file

all-contributors generate does not work

  • all-contributors-cli version: 4.11.1
  • node version: 9.11.1
  • yarn version: 1.6.0

Relevant code or config

{
  "projectName": "vue-aplayer",
  "projectOwner": "MoePlayer",
  "commit": false,
  "contributors": [
    {
      "login": "u3u",
      "name": "さくら",
      "avatar_url": "https://avatars2.githubusercontent.com/u/20062482?v=4",
      "profile": "https://qwq.cat",
      "contributions": [
        "question",
        "bug",
        "code",
        "doc",
        "example",
        "ideas",
        "infra",
        "review"
      ]
    },
    {
      "login": "DIYgod",
      "name": "DIYgod",
      "avatar_url": "https://avatars2.githubusercontent.com/u/8266075?v=4",
      "profile": "https://diygod.me",
      "contributions": [
        "design",
        "ideas"
      ]
    }
  ]
}

What you did:

yarn contributors
yarn run v1.6.0
$ all-contributors
? What do you want to do? Re-generate the contributors list
✨  Done in 18.32s.

What happened:

Nothing happened

image

Reproduction repository:

https://github.com/MoePlayer/vue-aplayer

let's separate the MD table string generation functionality into a standalone library

hi all,

Currently, if somebody wants to make an alternative tool that generates the same-looking contributors table, there's no way to automatically ensure that generated MD string (table) matches the "official" format of the contributors table.

Ideally, whatever CLI does - reading its configs, parsing existing table and so on should lead up to generating some sort of a data structure (object). It would then be fed into a separate library which renders the MD table string from that data structure.

This way, anybody who doesn't like the CLI behaviour or want completely different tool to maintain the contributors could still generate compatible contributors' table. In turn, that generated readme would still be compatible with this CLI or any other tools from all-contributors family.

At the moment, I can easily reference the format of the contributors MD table and write my own renderer, but as #54 showed, the format of the table evolves in time and separation of CLI from renderer would help to keep everybody in sync and foster the whole ecosystem of tools that can generate the standard all-contributors table.

So that was renderer.

A parser would be nice too - an "official" parser which can parse the readme and extract info from all-contributors table according to official, latest spec. Let's say somebody wants to update the contributors badge according to existing contents of readme and its contributors table.

Support other sources other than Github

  • all-contributors-cli version: 4.10.1
  • node version: 8.9.4
  • npm (or yarn) version: npm 5.5.1

What you did:

I am generating the Contributors section, but my users exist in a local gitlab installation rather than github.

Problem description:

I want to be able to add contributors using my gitlab local installation rather than github. Gitlab also has an api to retrieve user information, which contains the login, name, avatar url, and profile url. From what I was able to see, the only interaction wit github is in the contributor/github.js, and therefore it would be possible to extend this behavior to other providers (such as gitlab)

Suggested solution:

I can investigate as to how to implement such a solution if you see this as a desirable feature. It could be acieved either via a config file, the cli or in the package.json itself, so that the user would be able to change the default github option. One issue that may be important is that with my gitlab installation, I will need to provide a personal access token for these requests.

I will wait for your feedback prior to deep diving into implementation.

Properly handle the case where there are no contributors

When there are no contributors, this will be generated:

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

Instead, it should simply inject an empty content.

To avoid having no contributors in the first place, the init command should also add the project owner to the list of contributors whenever possible.

I will take care of this in the following days, except if someone wants to take a stab at it.

Breaking change: update default URL behavior

👋 Hi again!

I'm opening up this issue because this feature seems unexpected to me. I could see someone maybe adding these URLs to their projects, but it seems like that would be the exception, rather than the default.

For instance, the all-contributors project itself doesn't include links like this. I didn't check all of the projects, but it's probably a safe bet that none of the projects listed in the implementations list use these links, either.

Does anyone else think it would make more sense to default these sorts of contribution types to having no link? Right now, if most of the contributions have links that don't work, then that could possibly distract from the links that actually do point somewhere useful.

No big deal either way, but I figured I'd open this up for discussion.

Thanks for reading!

Add emoji for Report

Some people add code coverage reports, cleanliness reports, and more.

Would be cool to have a report option.

Getting "all-contributors: command not found" error

  • all-contributors-cli version: 4.11.1
  • node version: 8.11.2
  • npm (or yarn) version: 6.0.1

What you did:

Followed the readme to install, init, and then generate.

What happened:

$ npm install --save-dev all-contributors-cli
$ npx all-contributors init
$ all-contributors generate
all-contributors: command not found

Suggested solution:

I don't know what I'm doing, but $ npx all-contributors generate seemed to do the trick for me.

I opened this issue because I didn't see this error in any of the other issues and perhaps others are running into this as well.

A few items

If you'd like, I can file individual issues for each of these individually based on what you're interested in actually implementing.

  1. Rename properties? login -> gitHubUsername, avatar_url -> avatarUrl, -> html_url -> htmlUrl. Mostly just because I hate snake case. Feel free to reject this request :-)
  2. I would love it if I didn't have to provide the name, avatar_url, and html_url. If we could use the public github API to get this information that'd be awesome. The html_url can default to the user's github page and they can override all of these if they want by giving something specific. But doing this means that if someone changes their name, we can get that update next time this is run. It also saves on typing 👍
  3. It says the imageSize isn't required, but if I don't provide it, the size is set to undefined.
  4. It'd be awesome if I didn't have to provide a project name/owner. You can find the github url with git and determine that information that way :-)
  5. And another ping on #7 :-)

I just implemented this on this new project and overall it was an awesome experience. Thanks!

Unknown error on adding contributors via expanded syntax

For some reason, i'm getting exit code 1 (without an error, since I've added debugging and it properly returns undefined for error in the handler) when running:

$ add-contributors add blackxored code,doc,infra,test
$ echo $?
1

On README.md

<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
| [<img src="https://avatars3.githubusercontent.com/u/133308?v=4" width="100px;"/><br /><sub><b>Adrian Perez</b></sub>](https://adrianperez.codes)<br />[💻](https://github.com/blackxored/testapp/commits?author=blackxored "Code") [🚇](#infra-blackxored "Infrastructure (Hosting, Build-Tools, etc)") [⚠️](https://github.com/black xored/testapp/commits?author=blackxored "Tests") [📖](https://github.com/blackxored/testapp/commits?author=blackxored "Documentation") |
| :---: |
<!-- ALL-CONTRIBUTORS-LIST:END -->

It successfully generates, adds to the contributors in .allcontributorsrc, and everything seems to work, but somehow I'm getting that exit code.

Handle common errors

  • Could not find .all-contributorsrc file.
  • projectOwner is not set in .all-contributorsrc file.
  • projectName is not set in .all-contributorsrc file.
  • files was overriden in .all-contributorsrc file and is empty.
  • Could not find some of the files to inject into. If adding a contributor, the addition should still take place.
  • Could not find any injection tags. If adding a contributor, the addition should still take place.
  • No login when adding a contributor.
  • No contribution types when adding a contributor.
  • Login not found when adding a contributor.
  • Network error adding a contributor.
  • Contribution type not found.

In all of these cases: Should print some helpful error and exit.

If you wish to contribute, first off: thanks!
Feel free to tackle one or a few of these problems, no need to do them all (considering the number of them, I'd actually prefer multiple PRs).

Publish 2.0.0... again?

You have some beta versions that were released more recently than the 2.0.0 which makes things pretty confusing. Could you publish a 2.0.1 or something? Maybe even a 3.0.0 if there are breaking changes?

contributor cards in second row and onwards are not in bold

Hi all,

Currently only the first row is in bold:

bold-not-bold

If we added double asterisks on every card's label on second row and onwards, we could make all cards look the same - in bold:

**[<img src="https://avatars3.githubusercontent.com/u/5038030?v=4" width="100px;"/><br /><sub>Charlike</sub>](https://github.com/tunnckocore)**<br />

What do you think?

Btw I'm not going to contribute any code to this, feel free to grab it.

Duplicate entries when adding a contributor twice

if I add the same user with the same contributions, shouldn't it just no op?

And then if I add an existing user with a new contribution, shouldn't it just modify that contributor's contributions array? As far as for a CLI, it should be smart about the existing contents of the .all-contributorsrc correct?

Custom link for contribution categories

Hi there,

I'd like to propose a feature when generating links for "ideas" contribution.
It would be handy to allow changing the link, without replacing the whole template.

Currently, the links for "ideas" are generated like this:

#ideas-{username}

I'd like to customize it to link to GitHub Issues. As this can vary from project to project, maybe all-contributors-cli could support link templates, per contribution category?

On "ideas" contributions we could have a couple of options, such as:

  1. Issues created by that user:
/{projectOwner}/{projectName}/issues/created_by/{username}
  1. Filtering issues with a specific label ("ideas" / "proposal" / etc)
/{projectOwner}/{projectName}/issues?q=author%3A{username}+label%3Aideas

What's your thoughts on this? Cheers!

Receiving some errors on Windows.

Hey all,

Today I added myself as a contributor to one OSS repo through the all-contributors CLI. I ended up receiving some errors, even though it looked like the contributors file was updated and a commit was made.

Here is the full log:

joachim@DESKTOP-O4ENA28 E:\projects\codesandbox-client
> npm run add

> [email protected] add E:\projects\codesandbox-client
> all-contributors add

? What is the contributor's GitHub username? jseminck
? What are the contribution types? 💻  Code
undefined
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] add: `all-contributors add`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] add script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\joachim\AppData\Roaming\npm-cache\_logs\2017-08-18T15_35_23_293Z-debug.log

joachim@DESKTOP-O4ENA28 E:\projects\codesandbox-client
> cat C:\Users\joachim\AppData\Roaming\npm-cache\_logs\2017-08-18T15_35_23_293Z-debug.log
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'run',
1 verbose cli   'add' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'preadd', 'add', 'postadd' ]
5 info lifecycle [email protected]~preadd: [email protected]
6 info lifecycle [email protected]~add: [email protected]
7 verbose lifecycle [email protected]~add: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~add: PATH: C:\Users\joachim\AppData\Roaming\nvm\v8.4.0\node_modules\npm\bin\node-gyp-bin;E:\projects\codesandbox-client\node_modules\.bin;E:\projects\apps\conemu\ConEmu\Scripts;E:\projects\apps\conemu;E:\projects\apps\conemu\ConEmu;C:\Program Files\Docker\Docker\Resources\bin;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Skype\Phone\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Git\cmd;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Mercurial\;E:\projects\apps\apache-maven-3.3.9\bin;C:\Program Files\OpenVPN\bin;C:\Users\joachim\AppData\Roaming\nvm;C:\Program Files\nodejs;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Users\joachim\AppData\Local\Microsoft\WindowsApps;C:\Users\joachim\AppData\Roaming\npm;C:\Users\joachim\AppData\Local\atom\bin;C:\Users\joachim\AppData\Roaming\nvm;C:\Program Files\nodejs;C:\Users\joachim\AppData\Local\Microsoft\WindowsApps;;C:\Program Files (x86)\Microsoft VS Code\bin
9 verbose lifecycle [email protected]~add: CWD: E:\projects\codesandbox-client
10 silly lifecycle [email protected]~add: Args: [ '/d /s /c', 'all-contributors add' ]
11 silly lifecycle [email protected]~add: Returned: code: 1  signal: null
12 info lifecycle [email protected]~add: Failed to exec add script
13 verbose stack Error: [email protected] add: `all-contributors add`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (C:\Users\joachim\AppData\Roaming\nvm\v8.4.0\node_modules\npm\lib\utils\lifecycle.js:289:16)
13 verbose stack     at emitTwo (events.js:125:13)
13 verbose stack     at EventEmitter.emit (events.js:213:7)
13 verbose stack     at ChildProcess.<anonymous> (C:\Users\joachim\AppData\Roaming\nvm\v8.4.0\node_modules\npm\lib\utils\spawn.js:40:14)
13 verbose stack     at emitTwo (events.js:125:13)
13 verbose stack     at ChildProcess.emit (events.js:213:7)
13 verbose stack     at maybeClose (internal/child_process.js:927:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
14 verbose pkgid [email protected]
15 verbose cwd E:\projects\codesandbox-client
16 verbose Windows_NT 10.0.15063
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "add"
18 verbose node v8.4.0
19 verbose npm  v5.3.0
20 error code ELIFECYCLE
21 error errno 1
22 error [email protected] add: `all-contributors add`
22 error Exit status 1
23 error Failed at the [email protected] add script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

If I installed the CLI manually, then I did not get any errors, just an undefined message:

joachim@DESKTOP-O4ENA28 E:\projects\codesandbox-client
> npm install all-contributors-cli -g
C:\Program Files\nodejs\all-contributors -> C:\Program Files\nodejs\node_modules\all-contributors-cli\cli.js
+ [email protected]
added 144 packages in 21.045s

joachim@DESKTOP-O4ENA28 E:\projects\codesandbox-client
> all-contributors add
? What is the contributor's GitHub username? jseminck
? What are the contribution types? 💻  Code
undefined

Not sure, if it is related to me being on Windows... anyway, thought I'd report it in case anyone has had similar issues.

Force image size?

For some reason, GitHub doesn't size avatars which haven't yet been set like here

screen shot 2016-05-02 at 9 59 15 am

Is there a way we could format the table to force an image size?

Prompt for action when invoked without arguments

Considering the latest changes of v2.0.0-beta7, where the user is given a prompt when invoking all-contributors add without further arguments, I think it would be nice, when there's also a prompt when omitting any arguments at all.

I think of something like that:

$ all-contributors
  • When there's no .all-contributorsrc file present:
    • ask whether to run the initialization step,
    • exit.
  • When there's an .all-contributorsrc file present:
    • ask whether to add a new contributor (same as when invoking all-contributors add) ...
    • ask whether to only run generate,
    • exit.

Does that make sense?

Provide better support for organizations with multiple repos

The problem
Some projects (e.g. http://github.com/opendatakit which I'd like to implement the spec for) are spread across multiple repos and spaces outside of Github (e.g. Transifex, Discourse forum, etc). The script assumes that it is generating a contributor list for the repository it is in and generates URLs that don't make sense in a multi-repo context. For example https://github.com/opendatakit/contributors/commits?author=lognaturel is not what I want when I say I've made a code contribution.

The solution
I don't have a great solution yet. :/ Any ideas? Perhaps the config file could either specify a username and repo or an organization. In the case of an organization, none of those links that assume a repo would be generated.

Support generating the entire table via JSON config

In the rc file, I'd like to be able to do this:

{
  "projectOwner": "kentcdodds",
  "projectName": "all-contributors",
  "imageSize": 100,
  "owner": "jfmengels",
  "contributors": [
    {
      "name": "Jeroen Engels",
      "url": "https://github.com/jfmengels",
      "contributions": [
        "code",
        "doc",
        "test",
        {"type": "tool", "url": "https://github.com/jfmengels/all-contributors-cli"},
        "review"
      ]
    }
  ]
}

Which would produce:

| [![Jeroen Engels](https://avatars.githubusercontent.com/u/3869412?v=3&s=100)<br /><sub>Jeroen Engels</sub>](https://github.com/jfmengels)<br />[💻](https://github.com/kentcdodds/all-contributors/commits?author=jfmengels) [📖](https://github.com/kentcdodds/all-contributors/commits?author=jfmengels) [⚠️](https://github.com/kentcdodds/all-contributors/commits?author=jfmengels) [🔧](https://www.npmjs.com/package/all-contributors-cli) 👀
| :---: | :---: | :---: | :---: | :---: | :---: | :---: |

Notice that you can either pass a string or an object to the contributions and there are some default urls for each, but the default can be overridden with the object.

What do you think? 💭

Self-hosted GitLab instance

  • all-contributors-cli version: 4.11.1
  • node version: 8.11.1
  • npm (or yarn) version: 5.8.0

Relevant code or config

// .all-contributorsrc
{
  "projectName": "hub",
  "projectOwner": "prototyping",
  "repoType": "gitlab",
  "repoHost": "https://gitlab.mycompany.com",
  "files": [
    "README.md"
  ],
  "imageSize": 100,
  "commit": false,
  "contributors": []
}

What you did:
I tried to add a contributor.

all-contributors add dura code

What happened:
I got this error:

Cannot read property 'username' of undefined

Reproduction repository:
n/a since we have a private self-hosted gitlab instance...

Problem description:

Changing the repoType, repoHost and username to my public GitHub accounts seems to work, so I suspect it has something to do with the self-hosted repo.
However, you mention changing repoHost to a self hosted repo in the docs... so I'm assuming it is expected to work.

We do have 2FA enabled, could that be the problem?

Suggested solution:

Even with 2FA, we usually use the GitLab API by passing a personal access token.

Perhaps providing an option to do that will suffice?

enable custom commit message

  • all-contributors-cli version: latest
  • node version: latest
  • npm (or yarn) version: latest

Relevant code or config

// .all-contributorsrc
...
"commit": true,
...

What you did: add or update a contributor

What happened: commintlint report an error 'cause the commit message not match some rules.

Reproduction repository: -

Problem description: there's no config to replace the default commit message.

Suggested solution: add a new config let's say commitMessage to replace default commit message.

Run Prettier on all files once

The project should have all relevant files already prettier'd. This helps minimize the changes that have to be made by contributors.

This command should be all that's necassary.

prettier --write '**/*{.css,.js}' --config node_modules/kcd-scripts/dist/config/prettierrc.js

generate chokes with `Cannot read property 'symbol' of undefined`

Howdy!

First off, 💚 this! Thanks so much for building it 🙏

We had Kent on The Changelog last week and he's convinced us to use all-contributors for our repo. I am generating now and a specific user account breaks the generate command. It is:

https://github.com/soleo

I cannot figure out what is different about Xinjiang's profile, but when I remove him from the list the command succeeds. When I put him back in it prints Cannot read property 'symbol' of undefined and exits early. Here is the exact JSON object in the file:

{
      "login": "soleo",
      "name": "Xinjiang Shao",
      "avatar_url": "https://avatars3.githubusercontent.com/u/635858?v=3",
      "profile": "https://www.xinjiangshao.com",
      "contributions": [
        "docs",
        "code"
      ]
}

Any ideas what's going on? Happy to help troubleshoot or submit a patch 😄

add prettier-ignore comment

prettier now supports formatting markdown. It's SOOO cool, but it can mess up the table a bit. We can disable it by adding <!-- prettier-ignore --> right before the table, but if I do that today the comment will be removed by the re-generation. We need to have it added in via the template.

So the end result should look like:

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

TABLE_HERE

<!-- ALL-CONTRIBUTORS-LIST:END -->

Anyone wanna take this on?

Should update here to take care of init and I'm pretty sure that just insertting a line that says <!-- prettier-ignore --> right here would take care of generate.

Would probably need to update some tests too.

Saving a repo host URL different than "github.com" results in error when next attempting to add a new contributor

all-contributors-cli version: ^4.11.1
node version: 9.4.0
npm (or yarn) version: 5.6.0

Steps I took:

$ npx all-contributors init
? What's the name of the repository? codebuddies
? Who is the owner of the repository? codebuddies
? What is the repository type? GitHub
? Where is the repository hosted? https://github.com/codebuddiesdotorg/codebuddies
? In which file should contributors be listed? README.md
? Do you want a badge tallying the number of contributors? Yes
? In which file should the badge be shown? README.md
? How big should the avatars be? (in px) 100
? Do you want this badge to auto-commit when contributors are added? Yes
$ npm run contributors:add --lpatmo code

> [email protected] contributors:add /Users/lindapeng/Desktop/lindaprojects/codebuddies
> all-contributors add "code"

? What are the contribution types? 💻  Code
Not Found
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] contributors:add: `all-contributors add "code"`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] contributors:add script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/lindapeng/.npm/_logs/2018-03-19T21_13_45_845Z-debug.log

However, when I hit "enter" for the Where is the repository hosted? question and then try adding a contributor, I'm able to add a contributor successfully:

$ npx all-contributors init
? What's the name of the repository? codebuddies
? Who is the owner of the repository? codebuddies
? What is the repository type? GitHub
? Where is the repository hosted? https://github.com
? In which file should contributors be listed? README.md
? Do you want a badge tallying the number of contributors? Yes
? In which file should the badge be shown? README.md
? How big should the avatars be? (in px) 100
? Do you want this badge to auto-commit when contributors are added? Yes

$ npm run contributors:add --lpatmo code

> [email protected] contributors:add /Users/lindapeng/Desktop/lindaprojects/codebuddies
> all-contributors add "code"

? What are the contribution types? 💻  Code

I tried pasting in https://github.com/jfmengels/all-contributors-cli as the value for the Where is the repository hosted? question, and got the same error when I tried adding a new contributor too.

Error when running "npm run contributors:add -- username doc"

  • all-contributors-cli version: ^4.11.1
  • node version: 9.4.0
  • npm (or yarn) version: 5.6.0

What you did:
I ran: $ npm run contributors:add -- lpatmo doc

This is after I'd installed the package, and had this in my git diff:


lindapeng@Lindas-MacBook-Pro:~/Desktop/lindaprojects/codebuddies$ git diff
diff --git a/package.json b/package.json
index 585505e..c69e7bd 100644
--- a/package.json
+++ b/package.json
@@ -5,7 +5,9 @@
   "scripts": {
     "meteor:dev": "meteor --settings settings-development.json",
     "meteor:prod": "meteor --settings settings-production.json",
-    "test:full-app": "meteor test --full-app --driver-package=practicalmeteor:mocha --settings=settings-development.json --port 3100"
+    "test:full-app": "meteor test --full-app --driver-package=practicalmeteor:mocha --settings=settings-development.json --port 3100",
+    "contributors:add": "all-contributors add",
+    "contributors:generate": "all-contributors generate"
   },
   "dependencies": {
     "babel-runtime": "6.23.0",
@@ -25,6 +27,7 @@
     "uhr": "0.0.2"
   },
   "devDependencies": {
+    "all-contributors-cli": "^4.11.1",
     "cz-conventional-changelog": "2.0.0",
     "faker": "3.1.0"
   },

What happened:
The error message:


> [email protected] contributors:add /Users/lindapeng/Desktop/lindaprojects/codebuddies
> all-contributors add "lpatmo" "doc"

Not Found
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] contributors:add: `all-contributors add "lpatmo" "doc"`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] contributors:add script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/lindapeng/.npm/_logs/2018-03-19T08_22_20_349Z-debug.log

Problem description:
I got the above error after I tried to add a contributor, after installation.

Suggested solution:
Is there a problem using this package with a meteor app?

How to provide custom `types`?

  • all-contributors-cli version: v5.3.0
  • node version: v8.11.3
  • npm (or yarn) version: 6.2.0

Relevant code or config

{
  "projectName": "my-cool-project",
  "projectOwner": "me",
  "repoType": "gitlab",
  "repoHost": "https://gitlab.my-company.com",
  "files": [
    "README.md"
  ],
  "imageSize": 100,
  "commit": false,
  "types": {
    custom: {
      symbol: '📝',
      description: 'Some custom type',
    }
  }
  "contributors": [
    {
      "login": "dura",
      "name": "Christopher Dura",
      "avatar_url": "https://gitlab.my-company.com/uploads/-/system/user/avatar/114/avatar.png",
      "profile": "https://gitlab.my-company.com/dura",
      "contributions": [
        "code",
        "custom"
      ]
    }
  ]
}

What you did:

Tried to add a custom contribution type.

What happened:

Nothing.

Reproduction repository:

Problem description:

I would like to use my own custom types of contributions, and the docs indicate that I should be able to use the types config to do that. However, it is unclear, and I could really use an example configuration showing how to do that...

Suggested solution:

Someone give me a snippet of config I would need, or maybe update the README with an example config showing how to use all the options.

generate is a noop

Hi there!

I'm trying to use this CLI for the first time, and it must be that I'm making a silly mistake. When I run all-contributors generate, nothing happens.

I ran the init script, then added a contributor:

{
  "projectName": "resourceful-redux",
  "projectOwner": "jmeas",
  "files": [
    "README.md"
  ],
  "imageSize": 100,
  "commit": true,
  "contributors": [
    {
      "login": "jmeas",
      "name": "James, please",
      "avatar_url": "https://avatars3.githubusercontent.com/u/2322305?v=4",
      "profile": "http://www.jmeas.com",
      "contributions": [
        "code",
        "plugin",
        "doc"
      ]
    }
  ]
}

README.md exists. I also created CONTRIBUTORS.md for kicks. Neither of these files are updated when I run generate.

I'm sure I'm just missing something basic. I looked through #6 for ideas, but nothing seemed to stand out as a mistake that I was making. Any thoughts?

Thanks for reading!

[QUESTION] Different Languages?

Is it considered to have multiple languages on this tool?
(Maybe it's already implemented or planned)
If not, I'd love to add a PR 😄

Github hitting rate-limiting

It seems that when a call is rate-limited, github will return a 200 with the body...

{
  "message": "API rate limit exceeded for 0.0.0.0. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)",
  "documentation_url": "https://developer.github.com/v3/#rate-limiting"
}

Generate from GitHub?

Hi,

First of all, thanks for this.

I would like to know if there is a way to generate all existing contributors list from a GitHub repo at once? Nothing happens when I try to generate with an empty contributors file after init.
Do you have to add each contributor with add?

Allow tags to be on the same line

Having tags on the same line would allow to inject content (for instance, the badge) in a line.
Tags will be searched in the whole document and the first tag found will be replaced.
Problem: The example for adding the contributors list tag will be replaced.
Should be ok after #3 is done, as the examples will probably have been removed.

Add version flag

Allow a user to pass -- version to get version of CLI

motivation: helpful for tickets where version seems to be the issue.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.