From 1c6bdba662e9be3f3e3a6cb96af04c817db075eb Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" Date: Mon, 27 May 2019 00:32:00 +0100 Subject: [PATCH 01/85] fix(package): update async to version 3.0.1 (#188) --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6094ff1f..a181e70e 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "homepage": "https://github.com/all-contributors/all-contributors-cli#readme", "dependencies": { "@babel/runtime": "^7.2.0", - "async": "^2.0.0-rc.1", + "async": "^3.0.1", "chalk": "^2.3.0", "didyoumean": "^1.2.1", "inquirer": "^6.2.1", From 89c38407bc86bc8b04cd721b35d2e733488badbe Mon Sep 17 00:00:00 2001 From: "allcontributors[bot]" Date: Fri, 7 Jun 2019 10:19:30 +0100 Subject: [PATCH 02/85] docs: add nschonni as a contributor (#191) * docs: update README.md * docs: update .all-contributorsrc --- .all-contributorsrc | 9 +++++++++ README.md | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.all-contributorsrc b/.all-contributorsrc index 9760ba61..75812749 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -293,6 +293,15 @@ "contributions": [ "code" ] + }, + { + "login": "nschonni", + "name": "Nick Schonning", + "avatar_url": "https://avatars2.githubusercontent.com/u/1297909?v=4", + "profile": "https://github.com/nschonni", + "contributions": [ + "code" + ] } ], "files": [ diff --git a/README.md b/README.md index 4f6bd68f..6f427e95 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ [![Code Coverage](https://img.shields.io/codecov/c/github/all-contributors/all-contributors-cli.svg)](https://codecov.io/github/all-contributors/all-contributors-cli) [![Version](https://img.shields.io/npm/v/all-contributors-cli.svg)](https://www.npmjs.com/package/all-contributors-cli) [![Downloads](https://img.shields.io/npm/dm/all-contributors-cli.svg)](http://www.npmtrends.com/all-contributors-cli) -[![All Contributors](https://img.shields.io/badge/all_contributors-30-orange.svg?style=flat-square)](#contributors) +[![All Contributors](https://img.shields.io/badge/all_contributors-31-orange.svg?style=flat-square)](#contributors) [![Star on Github](https://img.shields.io/github/stars/all-contributors/all-contributors-cli.svg?style=social)](https://github.com/all-contributors/all-contributors-cli/stargazers) ## The problem @@ -57,7 +57,7 @@ Thanks goes to these wonderful people -
Jeroen Engels
Jeroen Engels

πŸ’» πŸ“– ⚠️
Kent C. Dodds
Kent C. Dodds

πŸ“– πŸ’»
JoΓ£o GuimarΓ£es
JoΓ£o GuimarΓ£es

πŸ’»
Ben Briggs
Ben Briggs

πŸ’»
Itai Steinherz
Itai Steinherz

πŸ“– πŸ’»
Alex Jover
Alex Jover

πŸ’» πŸ“–
Jerod Santo
Jerod Santo

πŸ’»
Kevin Jalbert
Kevin Jalbert

πŸ’»
tunnckoCore
tunnckoCore

πŸ”§
Mehdi Achour
Mehdi Achour

πŸ’»
Roy Revelt
Roy Revelt

πŸ›
Chris Vickery
Chris Vickery

πŸ’»
Bryce Reynolds
Bryce Reynolds

πŸ’»
James, please
James, please

πŸ€” πŸ’»
Spyros Ioakeimidis
Spyros Ioakeimidis

πŸ’»
Fernando Costa
Fernando Costa

πŸ’»
snipe
snipe

πŸ“–
Gant Laborde
Gant Laborde

πŸ’»
Md Zubair Ahmed
Md Zubair Ahmed

πŸ“– πŸ› πŸ’» ⚠️
Divjot Singh
Divjot Singh

πŸ“–
JoΓ£o Marques
JoΓ£o Marques

πŸ’» πŸ“– πŸ€”
Andrew Lisowski
Andrew Lisowski

πŸ’» πŸ“– ⚠️
Xianming Zhong
Xianming Zhong

πŸ“–
C.Y.Xu
C.Y.Xu

πŸ’»
Dura
Dura

πŸ“–
Jake Bolam
Jake Bolam

πŸš‡ πŸ’» πŸ“– ⚠️
Maximilian Berkmann
Maximilian Berkmann

πŸ’» ⚠️ πŸ“–
tbenning
tbenning

🎨
ehmicky
ehmicky

πŸ’»
James George
James George

πŸ’»
+
Jeroen Engels
Jeroen Engels

πŸ’» πŸ“– ⚠️
Kent C. Dodds
Kent C. Dodds

πŸ“– πŸ’»
JoΓ£o GuimarΓ£es
JoΓ£o GuimarΓ£es

πŸ’»
Ben Briggs
Ben Briggs

πŸ’»
Itai Steinherz
Itai Steinherz

πŸ“– πŸ’»
Alex Jover
Alex Jover

πŸ’» πŸ“–
Jerod Santo
Jerod Santo

πŸ’»
Kevin Jalbert
Kevin Jalbert

πŸ’»
tunnckoCore
tunnckoCore

πŸ”§
Mehdi Achour
Mehdi Achour

πŸ’»
Roy Revelt
Roy Revelt

πŸ›
Chris Vickery
Chris Vickery

πŸ’»
Bryce Reynolds
Bryce Reynolds

πŸ’»
James, please
James, please

πŸ€” πŸ’»
Spyros Ioakeimidis
Spyros Ioakeimidis

πŸ’»
Fernando Costa
Fernando Costa

πŸ’»
snipe
snipe

πŸ“–
Gant Laborde
Gant Laborde

πŸ’»
Md Zubair Ahmed
Md Zubair Ahmed

πŸ“– πŸ› πŸ’» ⚠️
Divjot Singh
Divjot Singh

πŸ“–
JoΓ£o Marques
JoΓ£o Marques

πŸ’» πŸ“– πŸ€”
Andrew Lisowski
Andrew Lisowski

πŸ’» πŸ“– ⚠️
Xianming Zhong
Xianming Zhong

πŸ“–
C.Y.Xu
C.Y.Xu

πŸ’»
Dura
Dura

πŸ“–
Jake Bolam
Jake Bolam

πŸš‡ πŸ’» πŸ“– ⚠️
Maximilian Berkmann
Maximilian Berkmann

πŸ’» ⚠️ πŸ“–
tbenning
tbenning

🎨
ehmicky
ehmicky

πŸ’»
James George
James George

πŸ’»
Nick Schonning
Nick Schonning

πŸ’»
From 68166eca69d1d6e5685aa956d11240b87c7cbca0 Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Tue, 11 Jun 2019 11:17:51 -0400 Subject: [PATCH 03/85] feat: Pretty-print the generagted HTML table (#190) Closes #189 Keeps the Table left aligned, and moves the tr and td in by 2 spaces each --- .../__tests__/__snapshots__/index.js.snap | 22 +++++++++++++++++-- src/generate/index.js | 8 ++++--- 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/src/generate/__tests__/__snapshots__/index.js.snap b/src/generate/__tests__/__snapshots__/index.js.snap index 860d71f5..74d677a1 100644 --- a/src/generate/__tests__/__snapshots__/index.js.snap +++ b/src/generate/__tests__/__snapshots__/index.js.snap @@ -9,7 +9,13 @@ Description These people contributed to the project: -
Kent C. Dodds is awesome!Divjot Singh is awesome!Jeroen Engels is awesome!
+ + + + + + +
Kent C. Dodds is awesome!Divjot Singh is awesome!Jeroen Engels is awesome!
@@ -25,7 +31,19 @@ Description These people contributed to the project: -
Kent C. Dodds is awesome!Kent C. Dodds is awesome!Kent C. Dodds is awesome!Kent C. Dodds is awesome!Kent C. Dodds is awesome!
Kent C. Dodds is awesome!Kent C. Dodds is awesome!
+ + + + + + + + + + + + +
Kent C. Dodds is awesome!Kent C. Dodds is awesome!Kent C. Dodds is awesome!Kent C. Dodds is awesome!Kent C. Dodds is awesome!
Kent C. Dodds is awesome!Kent C. Dodds is awesome!
diff --git a/src/generate/index.js b/src/generate/index.js index d6d1b3c8..5fd0b9a4 100644 --- a/src/generate/index.js +++ b/src/generate/index.js @@ -36,7 +36,9 @@ function injectListBetweenTags(newContent) { } function formatLine(contributors) { - return `${contributors.join('')}` + return `${contributors.join( + '\n ', + )}` } function generateContributorsList(options, contributors) { @@ -46,9 +48,9 @@ function generateContributorsList(options, contributors) { }), _.chunk(options.contributorsPerLine), _.map(formatLine), - _.join(''), + _.join('\n \n \n '), newContent => { - return `\n${newContent}
\n\n` + return `\n\n \n ${newContent}\n \n
\n\n` }, )(contributors) } From 49657e3f80bba49d6f94231820040a4b681a1fec Mon Sep 17 00:00:00 2001 From: Cezar Augusto Date: Sun, 16 Jun 2019 16:15:47 -0300 Subject: [PATCH 04/85] docs(README): spec link fix (#192) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6f427e95..0608f780 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ ## The problem -You want to implement the [All Contributors][all-contributors] spec, but don't +You want to implement the [All Contributors](https://github.com/all-contributors/all-contributors) spec, but don't want to maintain the table by hand ## This solution From 6932adb080a4cd9fbce85e2ee41fa155e5a95f7b Mon Sep 17 00:00:00 2001 From: "allcontributors[bot]" Date: Mon, 17 Jun 2019 09:36:12 +0100 Subject: [PATCH 05/85] docs: add cezaraugusto as a contributor (#193) * docs: update README.md * docs: update .all-contributorsrc --- .all-contributorsrc | 9 +++++++++ README.md | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.all-contributorsrc b/.all-contributorsrc index 75812749..ed7d4561 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -302,6 +302,15 @@ "contributions": [ "code" ] + }, + { + "login": "cezaraugusto", + "name": "Cezar Augusto", + "avatar_url": "https://avatars0.githubusercontent.com/u/4672033?v=4", + "profile": "https://cezaraugusto.net/", + "contributions": [ + "doc" + ] } ], "files": [ diff --git a/README.md b/README.md index 0608f780..eca1488a 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ [![Code Coverage](https://img.shields.io/codecov/c/github/all-contributors/all-contributors-cli.svg)](https://codecov.io/github/all-contributors/all-contributors-cli) [![Version](https://img.shields.io/npm/v/all-contributors-cli.svg)](https://www.npmjs.com/package/all-contributors-cli) [![Downloads](https://img.shields.io/npm/dm/all-contributors-cli.svg)](http://www.npmtrends.com/all-contributors-cli) -[![All Contributors](https://img.shields.io/badge/all_contributors-31-orange.svg?style=flat-square)](#contributors) +[![All Contributors](https://img.shields.io/badge/all_contributors-32-orange.svg?style=flat-square)](#contributors) [![Star on Github](https://img.shields.io/github/stars/all-contributors/all-contributors-cli.svg?style=social)](https://github.com/all-contributors/all-contributors-cli/stargazers) ## The problem @@ -57,7 +57,7 @@ Thanks goes to these wonderful people -
Jeroen Engels
Jeroen Engels

πŸ’» πŸ“– ⚠️
Kent C. Dodds
Kent C. Dodds

πŸ“– πŸ’»
JoΓ£o GuimarΓ£es
JoΓ£o GuimarΓ£es

πŸ’»
Ben Briggs
Ben Briggs

πŸ’»
Itai Steinherz
Itai Steinherz

πŸ“– πŸ’»
Alex Jover
Alex Jover

πŸ’» πŸ“–
Jerod Santo
Jerod Santo

πŸ’»
Kevin Jalbert
Kevin Jalbert

πŸ’»
tunnckoCore
tunnckoCore

πŸ”§
Mehdi Achour
Mehdi Achour

πŸ’»
Roy Revelt
Roy Revelt

πŸ›
Chris Vickery
Chris Vickery

πŸ’»
Bryce Reynolds
Bryce Reynolds

πŸ’»
James, please
James, please

πŸ€” πŸ’»
Spyros Ioakeimidis
Spyros Ioakeimidis

πŸ’»
Fernando Costa
Fernando Costa

πŸ’»
snipe
snipe

πŸ“–
Gant Laborde
Gant Laborde

πŸ’»
Md Zubair Ahmed
Md Zubair Ahmed

πŸ“– πŸ› πŸ’» ⚠️
Divjot Singh
Divjot Singh

πŸ“–
JoΓ£o Marques
JoΓ£o Marques

πŸ’» πŸ“– πŸ€”
Andrew Lisowski
Andrew Lisowski

πŸ’» πŸ“– ⚠️
Xianming Zhong
Xianming Zhong

πŸ“–
C.Y.Xu
C.Y.Xu

πŸ’»
Dura
Dura

πŸ“–
Jake Bolam
Jake Bolam

πŸš‡ πŸ’» πŸ“– ⚠️
Maximilian Berkmann
Maximilian Berkmann

πŸ’» ⚠️ πŸ“–
tbenning
tbenning

🎨
ehmicky
ehmicky

πŸ’»
James George
James George

πŸ’»
Nick Schonning
Nick Schonning

πŸ’»
+
Jeroen Engels
Jeroen Engels

πŸ’» πŸ“– ⚠️
Kent C. Dodds
Kent C. Dodds

πŸ“– πŸ’»
JoΓ£o GuimarΓ£es
JoΓ£o GuimarΓ£es

πŸ’»
Ben Briggs
Ben Briggs

πŸ’»
Itai Steinherz
Itai Steinherz

πŸ“– πŸ’»
Alex Jover
Alex Jover

πŸ’» πŸ“–
Jerod Santo
Jerod Santo

πŸ’»
Kevin Jalbert
Kevin Jalbert

πŸ’»
tunnckoCore
tunnckoCore

πŸ”§
Mehdi Achour
Mehdi Achour

πŸ’»
Roy Revelt
Roy Revelt

πŸ›
Chris Vickery
Chris Vickery

πŸ’»
Bryce Reynolds
Bryce Reynolds

πŸ’»
James, please
James, please

πŸ€” πŸ’»
Spyros Ioakeimidis
Spyros Ioakeimidis

πŸ’»
Fernando Costa
Fernando Costa

πŸ’»
snipe
snipe

πŸ“–
Gant Laborde
Gant Laborde

πŸ’»
Md Zubair Ahmed
Md Zubair Ahmed

πŸ“– πŸ› πŸ’» ⚠️
Divjot Singh
Divjot Singh

πŸ“–
JoΓ£o Marques
JoΓ£o Marques

πŸ’» πŸ“– πŸ€”
Andrew Lisowski
Andrew Lisowski

πŸ’» πŸ“– ⚠️
Xianming Zhong
Xianming Zhong

πŸ“–
C.Y.Xu
C.Y.Xu

πŸ’»
Dura
Dura

πŸ“–
Jake Bolam
Jake Bolam

πŸš‡ πŸ’» πŸ“– ⚠️
Maximilian Berkmann
Maximilian Berkmann

πŸ’» ⚠️ πŸ“–
tbenning
tbenning

🎨
ehmicky
ehmicky

πŸ’»
James George
James George

πŸ’»
Nick Schonning
Nick Schonning

πŸ’»
Cezar Augusto
Cezar Augusto

πŸ“–
From 42bc241ba16685f71738a6dc5142874798e9b363 Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Tue, 16 Jul 2019 15:15:52 +0200 Subject: [PATCH 06/85] feat: Make markdownlint ignore generated contributors table (#194) * add markdownlint-disable and scope prettier-ignore * re-generate contributors * set commitConvention to angular, sort .all-contributorsrc --- .all-contributorsrc | 20 ++++-- README.md | 70 ++++++++++++++++++- .../__tests__/__snapshots__/index.js.snap | 10 ++- src/generate/__tests__/index.js | 5 +- src/generate/index.js | 6 +- .../add-contributors-list.js.snap | 15 +++- src/init/init-content.js | 15 ++-- 7 files changed, 122 insertions(+), 19 deletions(-) diff --git a/.all-contributorsrc b/.all-contributorsrc index ed7d4561..707f6c92 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -5,6 +5,11 @@ "repoType": "github", "commit": false, "contributorsPerLine": 6, + "files": [ + "README.md" + ], + "repoHost": "https://github.com", + "commitConvention": "angular", "contributors": [ { "login": "jfmengels", @@ -311,10 +316,15 @@ "contributions": [ "doc" ] + }, + { + "login": "JReinhold", + "name": "Jeppe Reinhold", + "avatar_url": "https://avatars1.githubusercontent.com/u/5678122?v=4", + "profile": "https://reinhold.is", + "contributions": [ + "code" + ] } - ], - "files": [ - "README.md" - ], - "repoHost": "https://github.com" + ] } diff --git a/README.md b/README.md index eca1488a..c51e930e 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,17 @@ + + + +- [ + all-contributors-cli + ](#all-contributors-cli) + - [The problem](#the-problem) + - [This solution](#this-solution) + - [Using the all-contributors-cli](#using-the-all-contributors-cli) + - [Contributors](#contributors) + - [LICENSE](#license) + + + > [There is now a GitHub Bot](https://github.com/all-contributors/all-contributors-bot) for automating the maintenance of your contributors table ✨
Say goodbye to command line tool dependencies and hello to the [@all-contributors bot πŸ€–](https://github.com/all-contributors/all-contributors-bot)

@@ -32,7 +46,7 @@ [![Code Coverage](https://img.shields.io/codecov/c/github/all-contributors/all-contributors-cli.svg)](https://codecov.io/github/all-contributors/all-contributors-cli) [![Version](https://img.shields.io/npm/v/all-contributors-cli.svg)](https://www.npmjs.com/package/all-contributors-cli) [![Downloads](https://img.shields.io/npm/dm/all-contributors-cli.svg)](http://www.npmtrends.com/all-contributors-cli) -[![All Contributors](https://img.shields.io/badge/all_contributors-32-orange.svg?style=flat-square)](#contributors) +[![All Contributors](https://img.shields.io/badge/all_contributors-33-orange.svg?style=flat-square)](#contributors) [![Star on Github](https://img.shields.io/github/stars/all-contributors/all-contributors-cli.svg?style=social)](https://github.com/all-contributors/all-contributors-cli/stargazers) ## The problem @@ -56,8 +70,58 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)): - -
Jeroen Engels
Jeroen Engels

πŸ’» πŸ“– ⚠️
Kent C. Dodds
Kent C. Dodds

πŸ“– πŸ’»
JoΓ£o GuimarΓ£es
JoΓ£o GuimarΓ£es

πŸ’»
Ben Briggs
Ben Briggs

πŸ’»
Itai Steinherz
Itai Steinherz

πŸ“– πŸ’»
Alex Jover
Alex Jover

πŸ’» πŸ“–
Jerod Santo
Jerod Santo

πŸ’»
Kevin Jalbert
Kevin Jalbert

πŸ’»
tunnckoCore
tunnckoCore

πŸ”§
Mehdi Achour
Mehdi Achour

πŸ’»
Roy Revelt
Roy Revelt

πŸ›
Chris Vickery
Chris Vickery

πŸ’»
Bryce Reynolds
Bryce Reynolds

πŸ’»
James, please
James, please

πŸ€” πŸ’»
Spyros Ioakeimidis
Spyros Ioakeimidis

πŸ’»
Fernando Costa
Fernando Costa

πŸ’»
snipe
snipe

πŸ“–
Gant Laborde
Gant Laborde

πŸ’»
Md Zubair Ahmed
Md Zubair Ahmed

πŸ“– πŸ› πŸ’» ⚠️
Divjot Singh
Divjot Singh

πŸ“–
JoΓ£o Marques
JoΓ£o Marques

πŸ’» πŸ“– πŸ€”
Andrew Lisowski
Andrew Lisowski

πŸ’» πŸ“– ⚠️
Xianming Zhong
Xianming Zhong

πŸ“–
C.Y.Xu
C.Y.Xu

πŸ’»
Dura
Dura

πŸ“–
Jake Bolam
Jake Bolam

πŸš‡ πŸ’» πŸ“– ⚠️
Maximilian Berkmann
Maximilian Berkmann

πŸ’» ⚠️ πŸ“–
tbenning
tbenning

🎨
ehmicky
ehmicky

πŸ’»
James George
James George

πŸ’»
Nick Schonning
Nick Schonning

πŸ’»
Cezar Augusto
Cezar Augusto

πŸ“–
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Jeroen Engels
Jeroen Engels

πŸ’» πŸ“– ⚠️
Kent C. Dodds
Kent C. Dodds

πŸ“– πŸ’»
JoΓ£o GuimarΓ£es
JoΓ£o GuimarΓ£es

πŸ’»
Ben Briggs
Ben Briggs

πŸ’»
Itai Steinherz
Itai Steinherz

πŸ“– πŸ’»
Alex Jover
Alex Jover

πŸ’» πŸ“–
Jerod Santo
Jerod Santo

πŸ’»
Kevin Jalbert
Kevin Jalbert

πŸ’»
tunnckoCore
tunnckoCore

πŸ”§
Mehdi Achour
Mehdi Achour

πŸ’»
Roy Revelt
Roy Revelt

πŸ›
Chris Vickery
Chris Vickery

πŸ’»
Bryce Reynolds
Bryce Reynolds

πŸ’»
James, please
James, please

πŸ€” πŸ’»
Spyros Ioakeimidis
Spyros Ioakeimidis

πŸ’»
Fernando Costa
Fernando Costa

πŸ’»
snipe
snipe

πŸ“–
Gant Laborde
Gant Laborde

πŸ’»
Md Zubair Ahmed
Md Zubair Ahmed

πŸ“– πŸ› πŸ’» ⚠️
Divjot Singh
Divjot Singh

πŸ“–
JoΓ£o Marques
JoΓ£o Marques

πŸ’» πŸ“– πŸ€”
Andrew Lisowski
Andrew Lisowski

πŸ’» πŸ“– ⚠️
Xianming Zhong
Xianming Zhong

πŸ“–
C.Y.Xu
C.Y.Xu

πŸ’»
Dura
Dura

πŸ“–
Jake Bolam
Jake Bolam

πŸš‡ πŸ’» πŸ“– ⚠️
Maximilian Berkmann
Maximilian Berkmann

πŸ’» ⚠️ πŸ“–
tbenning
tbenning

🎨
ehmicky
ehmicky

πŸ’»
James George
James George

πŸ’»
Nick Schonning
Nick Schonning

πŸ’»
Cezar Augusto
Cezar Augusto

πŸ“–
Jeppe Reinhold
Jeppe Reinhold

πŸ’»
+ + + diff --git a/src/generate/__tests__/__snapshots__/index.js.snap b/src/generate/__tests__/__snapshots__/index.js.snap index 74d677a1..ba2c6e03 100644 --- a/src/generate/__tests__/__snapshots__/index.js.snap +++ b/src/generate/__tests__/__snapshots__/index.js.snap @@ -8,7 +8,8 @@ Description ## Contributors These people contributed to the project: - + + @@ -17,6 +18,8 @@ These people contributed to the project:
Kent C. Dodds is awesome!
+ + Thanks a lot everyone!" @@ -30,7 +33,8 @@ Description ## Contributors These people contributed to the project: - + + @@ -45,6 +49,8 @@ These people contributed to the project:
Kent C. Dodds is awesome!
+ + Thanks a lot everyone!" diff --git a/src/generate/__tests__/index.js b/src/generate/__tests__/index.js index abe5f047..c82f5bfc 100644 --- a/src/generate/__tests__/index.js +++ b/src/generate/__tests__/index.js @@ -119,7 +119,10 @@ test('inject nothing if there are no contributors', () => { '## Contributors', 'These people contributed to the project:', '', - '', + '', + '', + '', + '', '', '', 'Thanks a lot everyone!', diff --git a/src/generate/index.js b/src/generate/index.js index 5fd0b9a4..9141e212 100644 --- a/src/generate/index.js +++ b/src/generate/index.js @@ -28,8 +28,12 @@ function injectListBetweenTags(newContent) { } return [ previousContent.slice(0, endOfOpeningTagIndex + closingTag.length), - '\n', + '\n', + '\n', newContent, + '', + '\n', + '\n', previousContent.slice(startOfClosingTagIndex), ].join('') } diff --git a/src/init/__tests__/__snapshots__/add-contributors-list.js.snap b/src/init/__tests__/__snapshots__/add-contributors-list.js.snap index 3877768c..5500e598 100644 --- a/src/init/__tests__/__snapshots__/add-contributors-list.js.snap +++ b/src/init/__tests__/__snapshots__/add-contributors-list.js.snap @@ -7,7 +7,10 @@ exports[`create contributors section if content is empty 1`] = ` Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)): - + + + + This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!" @@ -22,7 +25,10 @@ Description Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)): - + + + + This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!" @@ -36,6 +42,9 @@ Description ## Contributors - + + + + " `; diff --git a/src/init/init-content.js b/src/init/init-content.js index 20f08ebb..9d433a5e 100644 --- a/src/init/init-content.js +++ b/src/init/init-content.js @@ -7,7 +7,10 @@ const headerContent = 'Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):' const listContent = [ '', - '', + '', + '', + '', + '', '', ].join('\n') const footerContent = @@ -18,7 +21,11 @@ function addBadge(lines) { } function splitAndRejoin(fn) { - return _.flow(_.split('\n'), fn, _.join('\n')) + return _.flow( + _.split('\n'), + fn, + _.join('\n'), + ) } const findContributorsSection = _.findIndex(function isContributorsSection( @@ -43,8 +50,8 @@ function addContributorsList(lines) { return injectContentBetween( lines, listContent, - insertionLine + 2, - insertionLine + 2, + insertionLine + 3, + insertionLine + 3, ) } From fdea80649d7bcb9df971cef5df00d8505e378049 Mon Sep 17 00:00:00 2001 From: "Rachel M. Carmena" Date: Fri, 19 Jul 2019 15:12:10 +0200 Subject: [PATCH 07/85] fix: badge link change Fix #195 --- .all-contributorsrc | 9 +++++++++ README.md | 5 +++-- src/generate/__tests__/format-badge.js | 4 ++-- src/generate/__tests__/index.js | 4 ++-- src/generate/format-badge.js | 2 +- src/generate/index.js | 2 +- src/init/__tests__/add-badge.js | 4 ++-- src/init/init-content.js | 2 +- 8 files changed, 21 insertions(+), 11 deletions(-) diff --git a/.all-contributorsrc b/.all-contributorsrc index 707f6c92..03a047d8 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -325,6 +325,15 @@ "contributions": [ "code" ] + }, + { + "login": "rachelcarmena", + "name": "Rachel M. Carmena", + "avatar_url": "https://avatars0.githubusercontent.com/u/22792183?v=4", + "profile": "https://rachelcarmena.github.io", + "contributions": [ + "code" + ] } ] } diff --git a/README.md b/README.md index c51e930e..0600e50a 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ [![Code Coverage](https://img.shields.io/codecov/c/github/all-contributors/all-contributors-cli.svg)](https://codecov.io/github/all-contributors/all-contributors-cli) [![Version](https://img.shields.io/npm/v/all-contributors-cli.svg)](https://www.npmjs.com/package/all-contributors-cli) [![Downloads](https://img.shields.io/npm/dm/all-contributors-cli.svg)](http://www.npmtrends.com/all-contributors-cli) -[![All Contributors](https://img.shields.io/badge/all_contributors-33-orange.svg?style=flat-square)](#contributors) +[![All Contributors](https://img.shields.io/badge/all_contributors-34-orange.svg?style=flat-square)](#contributors-) [![Star on Github](https://img.shields.io/github/stars/all-contributors/all-contributors-cli.svg?style=social)](https://github.com/all-contributors/all-contributors-cli/stargazers) ## The problem @@ -64,7 +64,7 @@ specification for your GitHub or GitLab repository. If you're looking to use the cli, head over to [the cli docs on allcontributors.org](https://allcontributors.org/docs/en/cli/overview). The all-contributors website contains all the information required to install, configure and use the all-contributors-cli. -## Contributors +## Contributors ✨ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)): @@ -117,6 +117,7 @@ Thanks goes to these wonderful people Nick Schonning
Nick Schonning

πŸ’» Cezar Augusto
Cezar Augusto

πŸ“– Jeppe Reinhold
Jeppe Reinhold

πŸ’» + Rachel M. Carmena
Rachel M. Carmena

πŸ’» diff --git a/src/generate/__tests__/format-badge.js b/src/generate/__tests__/format-badge.js index 3bcb15e0..1f13e65a 100644 --- a/src/generate/__tests__/format-badge.js +++ b/src/generate/__tests__/format-badge.js @@ -4,9 +4,9 @@ import formatBadge from '../format-badge' test('return badge with the number of contributors', () => { const options = {} const expected8 = - '[![All Contributors](https://img.shields.io/badge/all_contributors-8-orange.svg?style=flat-square)](#contributors)' + '[![All Contributors](https://img.shields.io/badge/all_contributors-8-orange.svg?style=flat-square)](#contributors-)' const expected16 = - '[![All Contributors](https://img.shields.io/badge/all_contributors-16-orange.svg?style=flat-square)](#contributors)' + '[![All Contributors](https://img.shields.io/badge/all_contributors-16-orange.svg?style=flat-square)](#contributors-)' expect(formatBadge(options, _.times(_.constant({}), 8))).toBe(expected8) expect(formatBadge(options, _.times(_.constant({}), 16))).toBe(expected16) diff --git a/src/generate/__tests__/index.js b/src/generate/__tests__/index.js index c82f5bfc..f4ec3387 100644 --- a/src/generate/__tests__/index.js +++ b/src/generate/__tests__/index.js @@ -143,7 +143,7 @@ test('replace all-contributors badge if present', () => { 'Badges', [ '[![version](https://img.shields.io/npm/v/all-contributors-cli.svg?style=flat-square)](http://npm.im/all-contributors-cli)', - '[![All Contributors](https://img.shields.io/badge/all_contributors-0-orange.svg?style=flat-square)](#contributors)', + '[![All Contributors](https://img.shields.io/badge/all_contributors-0-orange.svg?style=flat-square)](#contributors-)', '[![version](https://img.shields.io/npm/v/all-contributors-cli.svg?style=flat-square)](http://npm.im/all-contributors-cli)', ].join(''), '', @@ -155,7 +155,7 @@ test('replace all-contributors badge if present', () => { 'Badges', [ '[![version](https://img.shields.io/npm/v/all-contributors-cli.svg?style=flat-square)](http://npm.im/all-contributors-cli)', - '[![All Contributors](https://img.shields.io/badge/all_contributors-1-orange.svg?style=flat-square)](#contributors)', + '[![All Contributors](https://img.shields.io/badge/all_contributors-1-orange.svg?style=flat-square)](#contributors-)', '[![version](https://img.shields.io/npm/v/all-contributors-cli.svg?style=flat-square)](http://npm.im/all-contributors-cli)', ].join(''), '', diff --git a/src/generate/format-badge.js b/src/generate/format-badge.js index b349cfbf..f03730ca 100644 --- a/src/generate/format-badge.js +++ b/src/generate/format-badge.js @@ -1,7 +1,7 @@ const _ = require('lodash/fp') const defaultTemplate = - '[![All Contributors](https://img.shields.io/badge/all_contributors-<%= contributors.length %>-orange.svg?style=flat-square)](#contributors)' + '[![All Contributors](https://img.shields.io/badge/all_contributors-<%= contributors.length %>-orange.svg?style=flat-square)](#contributors-)' module.exports = function formatBadge(options, contributors) { return _.template(options.badgeTemplate || defaultTemplate)({ diff --git a/src/generate/index.js b/src/generate/index.js index 9141e212..314e2949 100644 --- a/src/generate/index.js +++ b/src/generate/index.js @@ -2,7 +2,7 @@ const _ = require('lodash/fp') const formatBadge = require('./format-badge') const formatContributor = require('./format-contributor') -const badgeRegex = /\[!\[All Contributors\]\([a-zA-Z0-9\-./_:?=]+\)\]\(#\w+\)/ +const badgeRegex = /\[!\[All Contributors\]\([a-zA-Z0-9\-./_:?=]+\)\]\(#[\w-]+\)/ function injectListBetweenTags(newContent) { return function(previousContent) { diff --git a/src/init/__tests__/add-badge.js b/src/init/__tests__/add-badge.js index cbcb4ab0..a0932104 100644 --- a/src/init/__tests__/add-badge.js +++ b/src/init/__tests__/add-badge.js @@ -4,7 +4,7 @@ test('insert badge under title', () => { const content = ['# project', '', 'Description', '', 'Foo bar'].join('\n') const expected = [ '# project', - '[![All Contributors](https://img.shields.io/badge/all_contributors-0-orange.svg?style=flat-square)](#contributors)', + '[![All Contributors](https://img.shields.io/badge/all_contributors-0-orange.svg?style=flat-square)](#contributors-)', '', 'Description', '', @@ -20,7 +20,7 @@ test('add badge if content is empty', () => { const content = '' const expected = [ '', - '[![All Contributors](https://img.shields.io/badge/all_contributors-0-orange.svg?style=flat-square)](#contributors)', + '[![All Contributors](https://img.shields.io/badge/all_contributors-0-orange.svg?style=flat-square)](#contributors-)', ].join('\n') const result = addBadge(content) diff --git a/src/init/init-content.js b/src/init/init-content.js index 9d433a5e..93b95435 100644 --- a/src/init/init-content.js +++ b/src/init/init-content.js @@ -2,7 +2,7 @@ const _ = require('lodash/fp') const injectContentBetween = require('../util').markdown.injectContentBetween const badgeContent = - '[![All Contributors](https://img.shields.io/badge/all_contributors-0-orange.svg?style=flat-square)](#contributors)' + '[![All Contributors](https://img.shields.io/badge/all_contributors-0-orange.svg?style=flat-square)](#contributors-)' const headerContent = 'Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):' const listContent = [ From 38211bd3670806f93abb47bedb3c0fc2e12f3acf Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" <23040076+greenkeeper[bot]@users.noreply.github.com> Date: Tue, 20 Aug 2019 16:36:07 +0100 Subject: [PATCH 08/85] =?UTF-8?q?Update=20yargs=20to=20the=20latest=20vers?= =?UTF-8?q?ion=20=F0=9F=9A=80=20(#199)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a181e70e..9b805f25 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "lodash": "^4.11.2", "pify": "^4.0.1", "request": "^2.72.0", - "yargs": "^13.1.0" + "yargs": "^14.0.0" }, "devDependencies": { "codecov": "^3.1.0", From b87fd034896adb51df7ecaf0a5340382e8fb231a Mon Sep 17 00:00:00 2001 From: simon3000 Date: Mon, 2 Sep 2019 18:15:43 +0200 Subject: [PATCH 09/85] fix(repo): test lint (#204) Fixes src/repo/__test__/github.js --- src/repo/__tests__/github.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/repo/__tests__/github.js b/src/repo/__tests__/github.js index 478d50aa..e43bf62b 100644 --- a/src/repo/__tests__/github.js +++ b/src/repo/__tests__/github.js @@ -80,13 +80,9 @@ test('Throw error when non existent username is provided', async () => { documentation_url: 'https://developer.github.com/v3/users/#get-a-single-user', }) - try { - await getUserInfo(username) - } catch (error) { - expect(error.message).toEqual( - `Login not found when adding a contributor for username - ${username}.`, - ) - } + await expect(getUserInfo(username)).rejects.toThrow( + `Login not found when adding a contributor for username - ${username}.`, + ) }) test('handle github errors', async () => { From f36d3be84cf9193788161485013c0de078c3e906 Mon Sep 17 00:00:00 2001 From: "allcontributors[bot]" <46447321+allcontributors[bot]@users.noreply.github.com> Date: Mon, 2 Sep 2019 21:41:15 +0100 Subject: [PATCH 10/85] docs: add simon300000 as a contributor (#206) * docs: update README.md * docs: update .all-contributorsrc --- .all-contributorsrc | 9 +++++++++ README.md | 7 ++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.all-contributorsrc b/.all-contributorsrc index 03a047d8..2304131a 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -334,6 +334,15 @@ "contributions": [ "code" ] + }, + { + "login": "simon300000", + "name": "simon3000", + "avatar_url": "https://avatars1.githubusercontent.com/u/12656264?v=4", + "profile": "https://github.com/simon300000", + "contributions": [ + "test" + ] } ] } diff --git a/README.md b/README.md index 0600e50a..70ac092d 100644 --- a/README.md +++ b/README.md @@ -70,8 +70,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)): - - + @@ -118,12 +117,10 @@ Thanks goes to these wonderful people +
Jeroen Engels
Jeroen Engels

πŸ’» πŸ“– ⚠️
Cezar Augusto
Cezar Augusto

πŸ“–
Jeppe Reinhold
Jeppe Reinhold

πŸ’»
Rachel M. Carmena
Rachel M. Carmena

πŸ’»
simon3000
simon3000

⚠️
- - - This project follows the From 06bbb6ed78fb6e8cac071e6f362bc8620b11ab24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?SnO=E2=82=82WMaN?= Date: Thu, 5 Sep 2019 00:48:01 +0900 Subject: [PATCH 11/85] feat: Add gitmoji option to commitConventions (#205) --- src/init/commit-conventions.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/init/commit-conventions.js b/src/init/commit-conventions.js index 5600533a..96d631b2 100644 --- a/src/init/commit-conventions.js +++ b/src/init/commit-conventions.js @@ -14,6 +14,10 @@ const conventions = { name: 'Atom', msg: ':memo:', }, + gitmoji: { + name: 'Gitmoji', + msg: ':busts_in_silhouette:', + }, ember: { name: 'Ember', msg: '[DOC canary]', From 65c3a60fb3afbcf0dc554fcaddb79280f86684b6 Mon Sep 17 00:00:00 2001 From: "allcontributors[bot]" <46447321+allcontributors[bot]@users.noreply.github.com> Date: Wed, 4 Sep 2019 19:40:21 +0100 Subject: [PATCH 12/85] docs: add SnO2WMaN as a contributor (#208) * docs: update README.md * docs: update .all-contributorsrc --- .all-contributorsrc | 9 +++++++++ README.md | 1 + 2 files changed, 10 insertions(+) diff --git a/.all-contributorsrc b/.all-contributorsrc index 2304131a..11bd26c5 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -343,6 +343,15 @@ "contributions": [ "test" ] + }, + { + "login": "SnO2WMaN", + "name": "SnOβ‚‚WMaN", + "avatar_url": "https://avatars3.githubusercontent.com/u/15155608?v=4", + "profile": "https://sno2wman.dev/", + "contributions": [ + "code" + ] } ] } diff --git a/README.md b/README.md index 70ac092d..2d5e821a 100644 --- a/README.md +++ b/README.md @@ -118,6 +118,7 @@ Thanks goes to these wonderful people Jeppe Reinhold
Jeppe Reinhold

πŸ’» Rachel M. Carmena
Rachel M. Carmena

πŸ’» simon3000
simon3000

⚠️ + SnOβ‚‚WMaN
SnOβ‚‚WMaN

πŸ’» From 1dccd9fe64467f89967c0ebc866b46cd850c08d4 Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" <23040076+greenkeeper[bot]@users.noreply.github.com> Date: Sat, 7 Sep 2019 14:29:44 +0100 Subject: [PATCH 13/85] chore(package): update nock to version 11.1.0 (#207) --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9b805f25..3fd7da39 100644 --- a/package.json +++ b/package.json @@ -58,7 +58,7 @@ "cz-conventional-changelog": "^2.1.0", "git-cz": "^3.0.0", "kcd-scripts": "^1.0.0", - "nock": "^10.0.6", + "nock": "^11.1.0", "semantic-release": "^15.13.2" }, "eslintIgnore": [ From a91145f0f336bdc2cc711b8c9677d6741b5bcc4e Mon Sep 17 00:00:00 2001 From: simon3000 Date: Mon, 16 Sep 2019 18:33:28 +0200 Subject: [PATCH 14/85] fix: username might be a number (#203) --- src/cli.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cli.js b/src/cli.js index 1ed3a394..57ea787d 100755 --- a/src/cli.js +++ b/src/cli.js @@ -72,7 +72,7 @@ function startGeneration(argv) { } function addContribution(argv) { - const username = argv._[1] + const username = String(argv._[1]) const contributions = argv._[2] // Add or update contributor in the config file return updateContributors(argv, username, contributions).then(data => { From 97878f496f10eb09327fe999484acf537c324196 Mon Sep 17 00:00:00 2001 From: Fabrizio <7031675+dexpota@users.noreply.github.com> Date: Sat, 19 Oct 2019 00:59:50 +0200 Subject: [PATCH 15/85] fix: add contributions (#211) * Fix issue #209 * Fix validation issue * Add myself to contributors list --- .all-contributorsrc | 10 ++++++++++ README.md | 32 ++++++++++++++++++++++---------- src/cli.js | 2 +- 3 files changed, 33 insertions(+), 11 deletions(-) diff --git a/.all-contributorsrc b/.all-contributorsrc index 11bd26c5..0d4101aa 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -352,6 +352,16 @@ "contributions": [ "code" ] + }, + { + "login": "dexpota", + "name": "Fabrizio", + "avatar_url": "https://avatars1.githubusercontent.com/u/7031675?v=4", + "profile": "https://www.destro.me", + "contributions": [ + "bug", + "code" + ] } ] } diff --git a/README.md b/README.md index 2d5e821a..e6210cfa 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,19 @@ -- [ - all-contributors-cli - ](#all-contributors-cli) +- [ all-contributors-cli ](#all-contributors-cli) - [The problem](#the-problem) - [This solution](#this-solution) - [Using the all-contributors-cli](#using-the-all-contributors-cli) - - [Contributors](#contributors) + - [Contributors ✨](#contributors-) - [LICENSE](#license) -> [There is now a GitHub Bot](https://github.com/all-contributors/all-contributors-bot) for automating the maintenance of your contributors table ✨
Say goodbye to command line tool dependencies and hello to the [@all-contributors bot πŸ€–](https://github.com/all-contributors/all-contributors-bot) +> [There is now a GitHub Bot](https://github.com/all-contributors/all-contributors-bot) +> for automating the maintenance of your contributors table ✨
Say goodbye +> to command line tool dependencies and hello to the +> [@all-contributors bot πŸ€–](https://github.com/all-contributors/all-contributors-bot)

all-contributors-cli @@ -46,13 +47,14 @@ [![Code Coverage](https://img.shields.io/codecov/c/github/all-contributors/all-contributors-cli.svg)](https://codecov.io/github/all-contributors/all-contributors-cli) [![Version](https://img.shields.io/npm/v/all-contributors-cli.svg)](https://www.npmjs.com/package/all-contributors-cli) [![Downloads](https://img.shields.io/npm/dm/all-contributors-cli.svg)](http://www.npmtrends.com/all-contributors-cli) -[![All Contributors](https://img.shields.io/badge/all_contributors-34-orange.svg?style=flat-square)](#contributors-) +[![All Contributors](https://img.shields.io/badge/all_contributors-37-orange.svg?style=flat-square)](#contributors-) [![Star on Github](https://img.shields.io/github/stars/all-contributors/all-contributors-cli.svg?style=social)](https://github.com/all-contributors/all-contributors-cli/stargazers) ## The problem -You want to implement the [All Contributors](https://github.com/all-contributors/all-contributors) spec, but don't -want to maintain the table by hand +You want to implement the +[All Contributors](https://github.com/all-contributors/all-contributors) spec, +but don't want to maintain the table by hand ## This solution @@ -62,7 +64,10 @@ specification for your GitHub or GitLab repository. ## Using the all-contributors-cli -If you're looking to use the cli, head over to [the cli docs on allcontributors.org](https://allcontributors.org/docs/en/cli/overview). The all-contributors website contains all the information required to install, configure and use the all-contributors-cli. +If you're looking to use the cli, head over to +[the cli docs on allcontributors.org](https://allcontributors.org/docs/en/cli/overview). +The all-contributors website contains all the information required to install, +configure and use the all-contributors-cli. ## Contributors ✨ @@ -70,7 +75,8 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)): - + + @@ -120,8 +126,14 @@ Thanks goes to these wonderful people + + +
Jeroen Engels
Jeroen Engels

πŸ’» πŸ“– ⚠️
simon3000
simon3000

⚠️
SnOβ‚‚WMaN
SnOβ‚‚WMaN

πŸ’»
Fabrizio
Fabrizio

πŸ› πŸ’»
+ + + This project follows the diff --git a/src/cli.js b/src/cli.js index 57ea787d..e3d728c1 100755 --- a/src/cli.js +++ b/src/cli.js @@ -72,7 +72,7 @@ function startGeneration(argv) { } function addContribution(argv) { - const username = String(argv._[1]) + const username = argv._[1] === undefined ? undefined : String(argv._[1]) const contributions = argv._[2] // Add or update contributor in the config file return updateContributors(argv, username, contributions).then(data => { From 72de75abc51ef73e2782a70de7a2be26342bf22f Mon Sep 17 00:00:00 2001 From: kharaone Date: Sun, 20 Oct 2019 01:45:00 +0200 Subject: [PATCH 16/85] fix: using a custom badge template breaks badge replacement (#210) --- src/generate/__tests__/index.js | 4 ++++ src/generate/index.js | 34 +++++++++++++++++++++++---------- src/init/__tests__/add-badge.js | 4 ++++ src/init/init-content.js | 8 ++++++-- 4 files changed, 38 insertions(+), 12 deletions(-) diff --git a/src/generate/__tests__/index.js b/src/generate/__tests__/index.js index f4ec3387..c75a883b 100644 --- a/src/generate/__tests__/index.js +++ b/src/generate/__tests__/index.js @@ -143,7 +143,9 @@ test('replace all-contributors badge if present', () => { 'Badges', [ '[![version](https://img.shields.io/npm/v/all-contributors-cli.svg?style=flat-square)](http://npm.im/all-contributors-cli)', + '', '[![All Contributors](https://img.shields.io/badge/all_contributors-0-orange.svg?style=flat-square)](#contributors-)', + '', '[![version](https://img.shields.io/npm/v/all-contributors-cli.svg?style=flat-square)](http://npm.im/all-contributors-cli)', ].join(''), '', @@ -155,7 +157,9 @@ test('replace all-contributors badge if present', () => { 'Badges', [ '[![version](https://img.shields.io/npm/v/all-contributors-cli.svg?style=flat-square)](http://npm.im/all-contributors-cli)', + '', '[![All Contributors](https://img.shields.io/badge/all_contributors-1-orange.svg?style=flat-square)](#contributors-)', + '', '[![version](https://img.shields.io/npm/v/all-contributors-cli.svg?style=flat-square)](http://npm.im/all-contributors-cli)', ].join(''), '', diff --git a/src/generate/index.js b/src/generate/index.js index 314e2949..3a2c899c 100644 --- a/src/generate/index.js +++ b/src/generate/index.js @@ -2,11 +2,9 @@ const _ = require('lodash/fp') const formatBadge = require('./format-badge') const formatContributor = require('./format-contributor') -const badgeRegex = /\[!\[All Contributors\]\([a-zA-Z0-9\-./_:?=]+\)\]\(#[\w-]+\)/ - function injectListBetweenTags(newContent) { return function(previousContent) { - const tagToLookFor = '' const startOfOpeningTagIndex = previousContent.indexOf( `${tagToLookFor}START`, @@ -61,15 +59,31 @@ function generateContributorsList(options, contributors) { function replaceBadge(newContent) { return function(previousContent) { - const regexResult = badgeRegex.exec(previousContent) - if (!regexResult) { + const tagToLookFor = `' + const startOfOpeningTagIndex = previousContent.indexOf( + `${tagToLookFor}START`, + ) + const endOfOpeningTagIndex = previousContent.indexOf( + closingTag, + startOfOpeningTagIndex, + ) + const startOfClosingTagIndex = previousContent.indexOf( + `${tagToLookFor}END`, + endOfOpeningTagIndex, + ) + if ( + startOfOpeningTagIndex === -1 || + endOfOpeningTagIndex === -1 || + startOfClosingTagIndex === -1 + ) { return previousContent } - return ( - previousContent.slice(0, regexResult.index) + - newContent + - previousContent.slice(regexResult.index + regexResult[0].length) - ) + return [ + previousContent.slice(0, endOfOpeningTagIndex + closingTag.length), + newContent, + previousContent.slice(startOfClosingTagIndex), + ].join('') } } diff --git a/src/init/__tests__/add-badge.js b/src/init/__tests__/add-badge.js index a0932104..78b6d0d4 100644 --- a/src/init/__tests__/add-badge.js +++ b/src/init/__tests__/add-badge.js @@ -4,7 +4,9 @@ test('insert badge under title', () => { const content = ['# project', '', 'Description', '', 'Foo bar'].join('\n') const expected = [ '# project', + '', '[![All Contributors](https://img.shields.io/badge/all_contributors-0-orange.svg?style=flat-square)](#contributors-)', + '', '', 'Description', '', @@ -20,7 +22,9 @@ test('add badge if content is empty', () => { const content = '' const expected = [ '', + '', '[![All Contributors](https://img.shields.io/badge/all_contributors-0-orange.svg?style=flat-square)](#contributors-)', + '', ].join('\n') const result = addBadge(content) diff --git a/src/init/init-content.js b/src/init/init-content.js index 93b95435..f772eb30 100644 --- a/src/init/init-content.js +++ b/src/init/init-content.js @@ -1,8 +1,12 @@ const _ = require('lodash/fp') const injectContentBetween = require('../util').markdown.injectContentBetween -const badgeContent = - '[![All Contributors](https://img.shields.io/badge/all_contributors-0-orange.svg?style=flat-square)](#contributors-)' +const badgeContent = [ + '', + '[![All Contributors](https://img.shields.io/badge/all_contributors-0-orange.svg?style=flat-square)](#contributors-)', + '', +].join('\n') + const headerContent = 'Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):' const listContent = [ From deee5d0a01b9a693ade02790688a3ec17a0e72d8 Mon Sep 17 00:00:00 2001 From: Marcelo Alves Date: Tue, 5 Nov 2019 17:52:44 -0800 Subject: [PATCH 17/85] feat: add review links (#213) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: 🎸 add review links * docs: add marceloalves to contributors --- .all-contributorsrc | 9 +++++++++ README.md | 1 + src/generate/__tests__/format-contribution-type.js | 9 +++++++++ src/generate/__tests__/format-contributor.js | 6 +++--- src/repo/index.js | 12 ++++++++++++ src/util/contribution-types.js | 1 + 6 files changed, 35 insertions(+), 3 deletions(-) diff --git a/.all-contributorsrc b/.all-contributorsrc index 0d4101aa..be61bed4 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -362,6 +362,15 @@ "bug", "code" ] + }, + { + "login": "MarceloAlves", + "name": "Marcelo Alves", + "avatar_url": "https://avatars1.githubusercontent.com/u/216782?v=4", + "profile": "https://github.com/marceloalves", + "contributions": [ + "code" + ] } ] } diff --git a/README.md b/README.md index e6210cfa..f42f0361 100644 --- a/README.md +++ b/README.md @@ -128,6 +128,7 @@ Thanks goes to these wonderful people Fabrizio
Fabrizio

πŸ› πŸ’» + Marcelo Alves
Marcelo Alves

πŸ’» diff --git a/src/generate/__tests__/format-contribution-type.js b/src/generate/__tests__/format-contribution-type.js index a7317af4..11bff893 100644 --- a/src/generate/__tests__/format-contribution-type.js +++ b/src/generate/__tests__/format-contribution-type.js @@ -50,6 +50,15 @@ test('return link to issues', () => { expect(formatContributionType(options, contributor, 'bug')).toBe(expected) }) +test('return link to reviews', () => { + const contributor = contributors.kentcdodds + const {options} = fixtures() + const expected = + 'πŸ‘€' + + expect(formatContributionType(options, contributor, 'review')).toBe(expected) +}) + test('make any symbol into a link if contribution is an object', () => { const contributor = contributors.kentcdodds const {options} = fixtures() diff --git a/src/generate/__tests__/format-contributor.js b/src/generate/__tests__/format-contributor.js index b8feece1..8ed7564c 100644 --- a/src/generate/__tests__/format-contributor.js +++ b/src/generate/__tests__/format-contributor.js @@ -20,7 +20,7 @@ test('format a simple contributor', () => { const {options} = fixtures() const expected = - 'Kent C. Dodds
Kent C. Dodds

πŸ‘€' + 'Kent C. Dodds
Kent C. Dodds

πŸ‘€' expect(formatContributor(options, contributor)).toBe(expected) }) @@ -30,7 +30,7 @@ test('format contributor with complex contribution types', () => { const {options} = fixtures() const expected = - 'Kent C. Dodds
Kent C. Dodds

πŸ“– πŸ‘€ πŸ’¬' + 'Kent C. Dodds
Kent C. Dodds

πŸ“– πŸ‘€ πŸ’¬' expect(formatContributor(options, contributor)).toBe(expected) }) @@ -53,7 +53,7 @@ test('default image size to 100', () => { delete options.imageSize const expected = - 'Kent C. Dodds
Kent C. Dodds

πŸ‘€' + 'Kent C. Dodds
Kent C. Dodds

πŸ‘€' expect(formatContributor(options, contributor)).toBe(expected) }) diff --git a/src/repo/index.js b/src/repo/index.js index ac3196c8..808d70b4 100644 --- a/src/repo/index.js +++ b/src/repo/index.js @@ -12,6 +12,8 @@ const SUPPORTED_REPO_TYPES = { '<%= options.repoHost || "https://github.com" %>/<%= options.projectOwner %>/<%= options.projectName %>/commits?author=<%= contributor.login %>', linkToIssues: '<%= options.repoHost || "https://github.com" %>/<%= options.projectOwner %>/<%= options.projectName %>/issues?q=author%3A<%= contributor.login %>', + linkToReviews: + '<%= options.repoHost || "https://github.com" %>/<%= options.projectOwner %>/<%= options.projectName %>/pulls?q=is%3Apr+reviewed-by%3A<%= contributor.login %>', getUserInfo: githubAPI.getUserInfo, getContributors: githubAPI.getContributors, }, @@ -24,6 +26,8 @@ const SUPPORTED_REPO_TYPES = { '<%= options.repoHost || "https://gitlab.com" %>/<%= options.projectOwner %>/<%= options.projectName %>/commits/master', linkToIssues: '<%= options.repoHost || "https://gitlab.com" %>/<%= options.projectOwner %>/<%= options.projectName %>/issues?author_username=<%= contributor.login %>', + linkToReviews: + '<%= options.repoHost || "https://gitlab.com" %>/<%= options.projectOwner %>/<%= options.projectName %>/merge_requests?scope=all&state=all&approver_usernames[]=<%= contributor.login %>', getUserInfo: gitlabAPI.getUserInfo, getContributors: gitlabAPI.getContributors, }, @@ -77,6 +81,13 @@ const getLinkToIssues = function(repoType) { return null } +const getLinkToReviews = function(repoType) { + if (repoType in SUPPORTED_REPO_TYPES) { + return SUPPORTED_REPO_TYPES[repoType].linkToReviews + } + return null +} + const getUserInfo = function(username, repoType, repoHost) { if (repoType in SUPPORTED_REPO_TYPES) { return SUPPORTED_REPO_TYPES[repoType].getUserInfo( @@ -107,6 +118,7 @@ module.exports = { getTypeName, getLinkToCommits, getLinkToIssues, + getLinkToReviews, getUserInfo, getContributors, } diff --git a/src/util/contribution-types.js b/src/util/contribution-types.js index 8d792c11..dbb22570 100644 --- a/src/util/contribution-types.js +++ b/src/util/contribution-types.js @@ -81,6 +81,7 @@ const defaultTypes = function(repoType) { review: { symbol: 'πŸ‘€', description: 'Reviewed Pull Requests', + link: repo.getLinkToReviews(repoType), }, security: { symbol: 'πŸ›‘οΈ', From 48417340aa7a1d49ed685d7718d2ad101a4937f1 Mon Sep 17 00:00:00 2001 From: Maximilian Berkmann Date: Wed, 6 Nov 2019 12:12:59 +0000 Subject: [PATCH 18/85] chore(config): bump node (#221) --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 58dae44b..01cc2c7e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,7 +2,7 @@ version: 2.1 docker_defaults: &docker_defaults docker: - - image: circleci/node:8.14.0 + - image: circleci/node:8.16.2 commands: prep_env: From 8cb283bee843258957a6d6a1dcc2f6c0a07075a6 Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" <23040076+greenkeeper[bot]@users.noreply.github.com> Date: Sat, 9 Nov 2019 11:09:07 +0000 Subject: [PATCH 19/85] =?UTF-8?q?Update=20chalk=20to=20the=20latest=20vers?= =?UTF-8?q?ion=20=F0=9F=9A=80=20(#224)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3fd7da39..8ed2dc59 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "dependencies": { "@babel/runtime": "^7.2.0", "async": "^3.0.1", - "chalk": "^2.3.0", + "chalk": "^3.0.0", "didyoumean": "^1.2.1", "inquirer": "^6.2.1", "json-fixer": "^1.3.1-0", From f38e0c8e87dc199e47bafdd60c2d549366958b18 Mon Sep 17 00:00:00 2001 From: Nicolas Goutay Date: Wed, 13 Nov 2019 11:38:04 +0100 Subject: [PATCH 20/85] feat: add a11y contribution type (#223) * feat: add a11y contribution type * Fix missing comma in `contribution-types.js` --- src/util/contribution-types.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/util/contribution-types.js b/src/util/contribution-types.js index dbb22570..a27d4364 100644 --- a/src/util/contribution-types.js +++ b/src/util/contribution-types.js @@ -3,6 +3,10 @@ const repo = require('../repo') const defaultTypes = function(repoType) { return { + a11y: { + symbol: '️️️️♿️', + description: 'Accessibility', + }, blog: { symbol: 'πŸ“', description: 'Blogposts', From 60cba871b99433df7d8d3c888671a4e52fc18fe6 Mon Sep 17 00:00:00 2001 From: "allcontributors[bot]" <46447321+allcontributors[bot]@users.noreply.github.com> Date: Wed, 13 Nov 2019 10:42:02 +0000 Subject: [PATCH 21/85] docs: add phacks as a contributor (#226) * docs: update README.md * docs: update .all-contributorsrc --- .all-contributorsrc | 9 +++++++++ README.md | 7 ++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.all-contributorsrc b/.all-contributorsrc index be61bed4..cf1c60b5 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -371,6 +371,15 @@ "contributions": [ "code" ] + }, + { + "login": "phacks", + "name": "Nicolas Goutay", + "avatar_url": "https://avatars1.githubusercontent.com/u/2587348?v=4", + "profile": "https://phacks.dev/", + "contributions": [ + "code" + ] } ] } diff --git a/README.md b/README.md index f42f0361..57f17c3b 100644 --- a/README.md +++ b/README.md @@ -75,8 +75,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)): - - + @@ -129,12 +128,10 @@ Thanks goes to these wonderful people +
Jeroen Engels
Jeroen Engels

πŸ’» πŸ“– ⚠️
Fabrizio
Fabrizio

πŸ› πŸ’»
Marcelo Alves
Marcelo Alves

πŸ’»
Nicolas Goutay
Nicolas Goutay

πŸ’»
- - - This project follows the From ed9d84d5d8b04d898b2a2cd721e96105a70935e3 Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" <23040076+greenkeeper[bot]@users.noreply.github.com> Date: Mon, 18 Nov 2019 00:34:14 +0000 Subject: [PATCH 22/85] =?UTF-8?q?Update=20yargs=20to=20the=20latest=20vers?= =?UTF-8?q?ion=20=F0=9F=9A=80=20(#227)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 8ed2dc59..ebd44db6 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "lodash": "^4.11.2", "pify": "^4.0.1", "request": "^2.72.0", - "yargs": "^14.0.0" + "yargs": "^15.0.1" }, "devDependencies": { "codecov": "^3.1.0", From 7d83c7cac195b97ad3cc2e971e536fa7e9792d77 Mon Sep 17 00:00:00 2001 From: James George Date: Thu, 28 Nov 2019 01:19:17 +0530 Subject: [PATCH 23/85] chore: make use of inhouse command recommendation (#228) --- package.json | 1 - src/cli.js | 15 +-------------- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/package.json b/package.json index ebd44db6..182b64b2 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,6 @@ "@babel/runtime": "^7.2.0", "async": "^3.0.1", "chalk": "^3.0.0", - "didyoumean": "^1.2.1", "inquirer": "^6.2.1", "json-fixer": "^1.3.1-0", "lodash": "^4.11.2", diff --git a/src/cli.js b/src/cli.js index e3d728c1..b07cfb72 100755 --- a/src/cli.js +++ b/src/cli.js @@ -5,10 +5,6 @@ const path = require('path') const yargs = require('yargs') const chalk = require('chalk') const inquirer = require('inquirer') -const didYouMean = require('didyoumean') - -// Setting edit length to be 60% of the input string's length -didYouMean.threshold = 0.6 const init = require('./init') const generate = require('./generate') @@ -24,6 +20,7 @@ const yargv = yargs .alias('h', 'help') .alias('v', 'version') .version() + .recommendCommands() .command('generate', 'Generate the list of contributors') .usage('Usage: $0 generate') .command('add', 'add a new contributor') @@ -50,15 +47,6 @@ const yargv = yargs } }).argv -function suggestCommands(cmd) { - const availableCommands = ['generate', 'add', 'init', 'check'] - const suggestion = didYouMean(cmd, availableCommands) - - if (suggestion) { - console.log(chalk.bold(`Did you mean ${suggestion}`)) - } -} - function startGeneration(argv) { return Promise.all( argv.files.map(file => { @@ -183,7 +171,6 @@ promptForCommand(yargv) case 'check': return checkContributors(yargv) default: - suggestCommands(command) throw new Error(`Unknown command ${command}`) } }) From 3382821641ddfaa13135156d2d6d3f5008169153 Mon Sep 17 00:00:00 2001 From: Anand Chowdhary Date: Thu, 28 Nov 2019 05:13:30 -0800 Subject: [PATCH 24/85] fix: a11y issue by removing unnecessary alternate text (#217) (#218) * fix(a11y): Remove unnecessary alternate text * fix: Remove alternate text from test images --- src/generate/__tests__/format-contributor.js | 11 ++++++----- src/generate/format-contributor.js | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/generate/__tests__/format-contributor.js b/src/generate/__tests__/format-contributor.js index 8ed7564c..a2fc80e5 100644 --- a/src/generate/__tests__/format-contributor.js +++ b/src/generate/__tests__/format-contributor.js @@ -20,7 +20,7 @@ test('format a simple contributor', () => { const {options} = fixtures() const expected = - 'Kent C. Dodds
Kent C. Dodds

πŸ‘€' + '
Kent C. Dodds

πŸ‘€' expect(formatContributor(options, contributor)).toBe(expected) }) @@ -30,7 +30,7 @@ test('format contributor with complex contribution types', () => { const {options} = fixtures() const expected = - 'Kent C. Dodds
Kent C. Dodds

πŸ“– πŸ‘€ πŸ’¬' + '
Kent C. Dodds

πŸ“– πŸ‘€ πŸ’¬' expect(formatContributor(options, contributor)).toBe(expected) }) @@ -53,7 +53,8 @@ test('default image size to 100', () => { delete options.imageSize const expected = - 'Kent C. Dodds
Kent C. Dodds

πŸ‘€' + '
Kent C. Dodds

πŸ‘€' + expect(formatContributor(options, contributor)).toBe(expected) }) @@ -63,7 +64,7 @@ test('format contributor with pipes in their name', () => { const {options} = fixtures() const expected = - 'Who | Needs | Pipes?
Who | Needs | Pipes?

πŸ“–' + '
Who | Needs | Pipes?

πŸ“–' expect(formatContributor(options, contributor)).toBe(expected) }) @@ -73,7 +74,7 @@ test('format contributor with no github account', () => { const {options} = fixtures() const expected = - 'No Github Account
No Github Account
🌍' + '
No Github Account
🌍' expect(formatContributor(options, contributor)).toBe(expected) }) diff --git a/src/generate/format-contributor.js b/src/generate/format-contributor.js index 67b55eea..63716f2d 100644 --- a/src/generate/format-contributor.js +++ b/src/generate/format-contributor.js @@ -2,7 +2,7 @@ const _ = require('lodash/fp') const formatContributionType = require('./format-contribution-type') const avatarTemplate = _.template( - '<%= name %>', + '', ) const avatarBlockTemplate = _.template( '<%= avatar %>
<%= name %>
', From dbb05a4dd8ac97e755f99cd3cd364f52101ec79f Mon Sep 17 00:00:00 2001 From: Jake Bolam Date: Sun, 8 Dec 2019 20:05:05 -0500 Subject: [PATCH 25/85] fix: fix badge replacement (#232) --- .gitignore | 1 + .nvmrc | 2 +- src/generate/__tests__/index.js | 12 ++++++------ src/generate/index.js | 2 ++ 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index ab4f4cb3..22b6454c 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ package-lock.json yarn.lock .vscode cache +.idea diff --git a/.nvmrc b/.nvmrc index 2a5dd0d6..894aa0bc 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -8.14.0 +8.16.0 diff --git a/src/generate/__tests__/index.js b/src/generate/__tests__/index.js index c75a883b..5a8e3a12 100644 --- a/src/generate/__tests__/index.js +++ b/src/generate/__tests__/index.js @@ -143,9 +143,9 @@ test('replace all-contributors badge if present', () => { 'Badges', [ '[![version](https://img.shields.io/npm/v/all-contributors-cli.svg?style=flat-square)](http://npm.im/all-contributors-cli)', - '', - '[![All Contributors](https://img.shields.io/badge/all_contributors-0-orange.svg?style=flat-square)](#contributors-)', - '', + '\n', + '[![All Contributors](https://img.shields.io/badge/all_contributors-0-orange.svg?style=flat-square)](#contributors-)\n', + '\n', '[![version](https://img.shields.io/npm/v/all-contributors-cli.svg?style=flat-square)](http://npm.im/all-contributors-cli)', ].join(''), '', @@ -157,9 +157,9 @@ test('replace all-contributors badge if present', () => { 'Badges', [ '[![version](https://img.shields.io/npm/v/all-contributors-cli.svg?style=flat-square)](http://npm.im/all-contributors-cli)', - '', - '[![All Contributors](https://img.shields.io/badge/all_contributors-1-orange.svg?style=flat-square)](#contributors-)', - '', + '\n', + '[![All Contributors](https://img.shields.io/badge/all_contributors-1-orange.svg?style=flat-square)](#contributors-)\n', + '\n', '[![version](https://img.shields.io/npm/v/all-contributors-cli.svg?style=flat-square)](http://npm.im/all-contributors-cli)', ].join(''), '', diff --git a/src/generate/index.js b/src/generate/index.js index 3a2c899c..91125359 100644 --- a/src/generate/index.js +++ b/src/generate/index.js @@ -81,7 +81,9 @@ function replaceBadge(newContent) { } return [ previousContent.slice(0, endOfOpeningTagIndex + closingTag.length), + '\n', newContent, + '\n', previousContent.slice(startOfClosingTagIndex), ].join('') } From cc2585bfe5f1f7c5a924308e4e00bc6bcdf52bf3 Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" <23040076+greenkeeper[bot]@users.noreply.github.com> Date: Tue, 17 Dec 2019 00:47:52 +0000 Subject: [PATCH 26/85] =?UTF-8?q?Update=20inquirer=20to=20the=20latest=20v?= =?UTF-8?q?ersion=20=F0=9F=9A=80=20(#201)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/package.json b/package.json index 182b64b2..8c3f65fd 100644 --- a/package.json +++ b/package.json @@ -45,6 +45,8 @@ "@babel/runtime": "^7.2.0", "async": "^3.0.1", "chalk": "^3.0.0", + "didyoumean": "^1.2.1", + "inquirer": "^7.0.0", "inquirer": "^6.2.1", "json-fixer": "^1.3.1-0", "lodash": "^4.11.2", From 0993a90a57ece7dea182d3e1876ad9296f41c212 Mon Sep 17 00:00:00 2001 From: Stefano Moia Date: Fri, 3 Jan 2020 23:22:24 +0100 Subject: [PATCH 27/85] feat(contribution-types): added "Data" contribution (#231) * feat(contribution-types): added "Data" contribution * Updated node and yarn versions to pass CI Co-authored-by: Maximilian Berkmann --- .circleci/config.yml | 8 +++++--- .nvmrc | 2 +- .yvmrc | 2 +- src/util/contribution-types.js | 4 ++++ 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 01cc2c7e..009ab1e2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,7 +2,7 @@ version: 2.1 docker_defaults: &docker_defaults docker: - - image: circleci/node:8.16.2 + - image: circleci/node:12.14.0 commands: prep_env: @@ -12,13 +12,15 @@ commands: path: ~/repo - restore_cache: name: Restore node_modules cache - key: all-contributors-cli-v2-{{ checksum "package.json" }}-{{ .Branch }} + key: + all-contributors-cli-v2-{{ checksum "package.json" }}-{{ .Branch }} save_env_cache: description: Saves environment cache steps: - save_cache: name: Save node_modules cache - key: all-contributors-cli-v2-{{ checksum "package.json" }}-{{ .Branch }} + key: + all-contributors-cli-v2-{{ checksum "package.json" }}-{{ .Branch }} paths: - node_modules/ diff --git a/.nvmrc b/.nvmrc index 894aa0bc..65d83ce5 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -8.16.0 +12.14.0 diff --git a/.yvmrc b/.yvmrc index 8fdcf386..28449774 100644 --- a/.yvmrc +++ b/.yvmrc @@ -1 +1 @@ -1.9.2 +1.21.1 diff --git a/src/util/contribution-types.js b/src/util/contribution-types.js index a27d4364..5db6ddc6 100644 --- a/src/util/contribution-types.js +++ b/src/util/contribution-types.js @@ -29,6 +29,10 @@ const defaultTypes = function(repoType) { symbol: 'πŸ–‹', description: 'Content', }, + data: { + symbol: 'πŸ”£', + description: 'Data', + }, design: { symbol: '🎨', description: 'Design', From b5d19636b09924a82adb3c324c1d43a272c33062 Mon Sep 17 00:00:00 2001 From: "allcontributors[bot]" <46447321+allcontributors[bot]@users.noreply.github.com> Date: Sat, 4 Jan 2020 00:39:46 +0000 Subject: [PATCH 28/85] docs: add smoia as a contributor (#240) * docs: update README.md [skip ci] * docs: update .all-contributorsrc [skip ci] --- .all-contributorsrc | 12 ++++++- README.md | 84 ++++++++++++++++++++++++--------------------- 2 files changed, 55 insertions(+), 41 deletions(-) diff --git a/.all-contributorsrc b/.all-contributorsrc index cf1c60b5..e437ad77 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -380,6 +380,16 @@ "contributions": [ "code" ] + }, + { + "login": "smoia", + "name": "Stefano Moia", + "avatar_url": "https://avatars3.githubusercontent.com/u/35300580?v=4", + "profile": "https://github.com/smoia", + "contributions": [ + "code" + ] } - ] + ], + "skipCi": true } diff --git a/README.md b/README.md index 57f17c3b..fbec6fbd 100644 --- a/README.md +++ b/README.md @@ -75,63 +75,67 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)): - + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - + + + +
Jeroen Engels
Jeroen Engels

πŸ’» πŸ“– ⚠️
Kent C. Dodds
Kent C. Dodds

πŸ“– πŸ’»
JoΓ£o GuimarΓ£es
JoΓ£o GuimarΓ£es

πŸ’»
Ben Briggs
Ben Briggs

πŸ’»
Itai Steinherz
Itai Steinherz

πŸ“– πŸ’»
Alex Jover
Alex Jover

πŸ’» πŸ“–

Jeroen Engels

πŸ’» πŸ“– ⚠️

Kent C. Dodds

πŸ“– πŸ’»

JoΓ£o GuimarΓ£es

πŸ’»

Ben Briggs

πŸ’»

Itai Steinherz

πŸ“– πŸ’»

Alex Jover

πŸ’» πŸ“–
Jerod Santo
Jerod Santo

πŸ’»
Kevin Jalbert
Kevin Jalbert

πŸ’»
tunnckoCore
tunnckoCore

πŸ”§
Mehdi Achour
Mehdi Achour

πŸ’»
Roy Revelt
Roy Revelt

πŸ›
Chris Vickery
Chris Vickery

πŸ’»

Jerod Santo

πŸ’»

Kevin Jalbert

πŸ’»

tunnckoCore

πŸ”§

Mehdi Achour

πŸ’»

Roy Revelt

πŸ›

Chris Vickery

πŸ’»
Bryce Reynolds
Bryce Reynolds

πŸ’»
James, please
James, please

πŸ€” πŸ’»
Spyros Ioakeimidis
Spyros Ioakeimidis

πŸ’»
Fernando Costa
Fernando Costa

πŸ’»
snipe
snipe

πŸ“–
Gant Laborde
Gant Laborde

πŸ’»

Bryce Reynolds

πŸ’»

James, please

πŸ€” πŸ’»

Spyros Ioakeimidis

πŸ’»

Fernando Costa

πŸ’»

snipe

πŸ“–

Gant Laborde

πŸ’»
Md Zubair Ahmed
Md Zubair Ahmed

πŸ“– πŸ› πŸ’» ⚠️
Divjot Singh
Divjot Singh

πŸ“–
JoΓ£o Marques
JoΓ£o Marques

πŸ’» πŸ“– πŸ€”
Andrew Lisowski
Andrew Lisowski

πŸ’» πŸ“– ⚠️
Xianming Zhong
Xianming Zhong

πŸ“–
C.Y.Xu
C.Y.Xu

πŸ’»

Md Zubair Ahmed

πŸ“– πŸ› πŸ’» ⚠️

Divjot Singh

πŸ“–

JoΓ£o Marques

πŸ’» πŸ“– πŸ€”

Andrew Lisowski

πŸ’» πŸ“– ⚠️

Xianming Zhong

πŸ“–

C.Y.Xu

πŸ’»
Dura
Dura

πŸ“–
Jake Bolam
Jake Bolam

πŸš‡ πŸ’» πŸ“– ⚠️
Maximilian Berkmann
Maximilian Berkmann

πŸ’» ⚠️ πŸ“–
tbenning
tbenning

🎨
ehmicky
ehmicky

πŸ’»
James George
James George

πŸ’»

Dura

πŸ“–

Jake Bolam

πŸš‡ πŸ’» πŸ“– ⚠️

Maximilian Berkmann

πŸ’» ⚠️ πŸ“–

tbenning

🎨

ehmicky

πŸ’»

James George

πŸ’»
Nick Schonning
Nick Schonning

πŸ’»
Cezar Augusto
Cezar Augusto

πŸ“–
Jeppe Reinhold
Jeppe Reinhold

πŸ’»
Rachel M. Carmena
Rachel M. Carmena

πŸ’»
simon3000
simon3000

⚠️
SnOβ‚‚WMaN
SnOβ‚‚WMaN

πŸ’»

Nick Schonning

πŸ’»

Cezar Augusto

πŸ“–

Jeppe Reinhold

πŸ’»

Rachel M. Carmena

πŸ’»

simon3000

⚠️

SnOβ‚‚WMaN

πŸ’»
Fabrizio
Fabrizio

πŸ› πŸ’»
Marcelo Alves
Marcelo Alves

πŸ’»
Nicolas Goutay
Nicolas Goutay

πŸ’»

Fabrizio

πŸ› πŸ’»

Marcelo Alves

πŸ’»

Nicolas Goutay

πŸ’»

Stefano Moia

πŸ’»
+ + This project follows the From 4f407508cc1d4bdc1d590bd3076453d41b21f174 Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" <23040076+greenkeeper[bot]@users.noreply.github.com> Date: Thu, 9 Jan 2020 01:32:20 +0000 Subject: [PATCH 29/85] =?UTF-8?q?Update=20kcd-scripts=20to=20the=20latest?= =?UTF-8?q?=20version=20=F0=9F=9A=80=20(#241)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 8c3f65fd..b04b2e25 100644 --- a/package.json +++ b/package.json @@ -58,7 +58,7 @@ "codecov": "^3.1.0", "cz-conventional-changelog": "^2.1.0", "git-cz": "^3.0.0", - "kcd-scripts": "^1.0.0", + "kcd-scripts": "^2.0.0", "nock": "^11.1.0", "semantic-release": "^15.13.2" }, From 0965095ecd1814120c780b303347c7ac19733840 Mon Sep 17 00:00:00 2001 From: Andrew Lisowski Date: Fri, 17 Jan 2020 12:09:58 -0800 Subject: [PATCH 30/85] feat: support Github Enterprise (#97) * add isEnterprise config option and add function to change hostname if on enterprise * add hipstersmoothie as contributor * infer enterprise API * handle enterprise authentication * add tylerkrupicka as a contributor Co-authored-by: Tyler Krupicka Co-authored-by: Maximilian Berkmann --- .all-contributorsrc | 10 +++++++ README.md | 12 ++++----- src/repo/__tests__/github.js | 17 +++++++++++- src/repo/github.js | 52 +++++++++++++++++++++++++----------- 4 files changed, 69 insertions(+), 22 deletions(-) diff --git a/.all-contributorsrc b/.all-contributorsrc index e437ad77..efc7524b 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -381,6 +381,16 @@ "code" ] }, + { + "login": "tylerkrupicka", + "name": "Tyler Krupicka", + "avatar_url": "https://avatars1.githubusercontent.com/u/5761061?s=460&v=4", + "profile": "https://github.com/tylerkrupicka", + "contributions": [ + "code", + "test" + ] + }, { "login": "smoia", "name": "Stefano Moia", diff --git a/README.md b/README.md index fbec6fbd..1fe5261f 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,11 @@ -- [ all-contributors-cli ](#all-contributors-cli) - - [The problem](#the-problem) - - [This solution](#this-solution) - - [Using the all-contributors-cli](#using-the-all-contributors-cli) - - [Contributors ✨](#contributors-) - - [LICENSE](#license) +- [The problem](#the-problem) +- [This solution](#this-solution) +- [Using the all-contributors-cli](#using-the-all-contributors-cli) +- [Contributors ✨](#contributors-%e2%9c%a8) +- [LICENSE](#license) @@ -130,6 +129,7 @@ Thanks goes to these wonderful people
Fabrizio

πŸ› πŸ’»
Marcelo Alves

πŸ’»
Nicolas Goutay

πŸ’» +
Tyler Krupicka

πŸ’» ⚠️
Stefano Moia

πŸ’» diff --git a/src/repo/__tests__/github.js b/src/repo/__tests__/github.js index e43bf62b..52a15927 100644 --- a/src/repo/__tests__/github.js +++ b/src/repo/__tests__/github.js @@ -85,6 +85,21 @@ test('Throw error when non existent username is provided', async () => { ) }) +test('Throw error when missing enterprise authentication', async () => { + const username = 'notauthenticated' + nock('http://github.myhost.com:3000/api/v3') + .get(`/users/${username}`) + .reply(401, { + message: 'Must authenticate to access this API.', + documentation_url: 'https://developer.github.com/enterprise/2.17/v3', + }) + await expect( + getUserInfo(username, 'http://github.myhost.com:3000'), + ).rejects.toThrow( + `Missing authentication for GitHub API. Did you set PRIVATE_TOKEN?`, + ) +}) + test('handle github errors', async () => { nock('https://api.github.com') .get('/users/nodisplayname') @@ -174,7 +189,7 @@ test('append http when no absolute link is provided', async () => { }) test('retrieve user from a different github registry', async () => { - nock('http://api.github.myhost.com:3000') + nock('http://github.myhost.com:3000/api/v3') .get('/users/nodisplayname') .reply(200, { login: 'nodisplayname', diff --git a/src/repo/github.js b/src/repo/github.js index b3069650..6cb8272a 100644 --- a/src/repo/github.js +++ b/src/repo/github.js @@ -1,6 +1,27 @@ +const url = require('url') const pify = require('pify') const request = pify(require('request')) +/** + * Get the host based on public or enterprise GitHub. + * https://developer.github.com/enterprise/2.17/v3/#current-version + * + * @param {String} hostname - Hostname from config. + * @returns {String} - Host for GitHub API. + */ +function getApiHost(hostname) { + if (!hostname) { + hostname = 'https://github.com' + } + + if (hostname !== 'https://github.com') { + // Assume Github Enterprise + return url.resolve(hostname, '/api/v3') + } + + return hostname.replace(/:\/\//, '://api.') +} + function getRequestHeaders(optionalPrivateToken = '') { const requestHeaders = { 'User-Agent': 'request', @@ -27,10 +48,10 @@ function getNextLink(link) { return nextLink.split(';')[0].slice(1, -1) } -function getContributorsPage(url, optionalPrivateToken) { +function getContributorsPage(githubUrl, optionalPrivateToken) { return request .get({ - url, + url: githubUrl, headers: getRequestHeaders(optionalPrivateToken), }) .then(res => { @@ -55,18 +76,13 @@ function getContributorsPage(url, optionalPrivateToken) { } const getUserInfo = function(username, hostname, optionalPrivateToken) { - /* eslint-disable complexity */ - if (!hostname) { - hostname = 'https://github.com' - } - if (!username) { throw new Error( `No login when adding a contributor. Please specify a username.`, ) } - const root = hostname.replace(/:\/\//, '://api.') + const root = getApiHost(hostname) return request .get({ url: `${root}/users/${username}`, @@ -77,6 +93,16 @@ const getUserInfo = function(username, hostname, optionalPrivateToken) { let profile = body.blog || body.html_url + // Check for authentication required + if ( + (!profile && body.message.includes('Must authenticate')) || + res.statusCode === 401 + ) { + throw new Error( + `Missing authentication for GitHub API. Did you set PRIVATE_TOKEN?`, + ) + } + // Github throwing specific errors as 200... if (!profile && body.message) { throw new Error( @@ -96,13 +122,9 @@ const getUserInfo = function(username, hostname, optionalPrivateToken) { } const getContributors = function(owner, name, hostname, optionalPrivateToken) { - if (!hostname) { - hostname = 'https://github.com' - } - - const root = hostname.replace(/:\/\//, '://api.') - const url = `${root}/repos/${owner}/${name}/contributors?per_page=100` - return getContributorsPage(url, optionalPrivateToken) + const root = getApiHost(hostname) + const contributorsUrl = `${root}/repos/${owner}/${name}/contributors?per_page=100` + return getContributorsPage(contributorsUrl, optionalPrivateToken) } module.exports = { From 3c124bf1eb0a0dccfbf70cd947099d4f2d23adcb Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" <23040076+greenkeeper[bot]@users.noreply.github.com> Date: Wed, 22 Jan 2020 11:39:15 +0000 Subject: [PATCH 31/85] =?UTF-8?q?Update=20kcd-scripts=20to=20the=20latest?= =?UTF-8?q?=20version=20=F0=9F=9A=80=20(#244)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b04b2e25..0062fad4 100644 --- a/package.json +++ b/package.json @@ -58,7 +58,7 @@ "codecov": "^3.1.0", "cz-conventional-changelog": "^2.1.0", "git-cz": "^3.0.0", - "kcd-scripts": "^2.0.0", + "kcd-scripts": "^3.0.0", "nock": "^11.1.0", "semantic-release": "^15.13.2" }, From 07099de09902d61d7d477513a43160b269a44c1d Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" <23040076+greenkeeper[bot]@users.noreply.github.com> Date: Sun, 26 Jan 2020 19:42:01 +0000 Subject: [PATCH 32/85] =?UTF-8?q?chore(deps):=20update=20inquirer=20to=20t?= =?UTF-8?q?he=20latest=20version=20=F0=9F=9A=80=20(#245)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(deps): upgrade `json-fixer` and `@babel/runtime` * chore(package): duplication removed Co-authored-by: Maximilian Berkmann --- package.json | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 0062fad4..a80fce51 100644 --- a/package.json +++ b/package.json @@ -42,13 +42,12 @@ }, "homepage": "https://github.com/all-contributors/all-contributors-cli#readme", "dependencies": { - "@babel/runtime": "^7.2.0", + "@babel/runtime": "^7.7.6", "async": "^3.0.1", "chalk": "^3.0.0", "didyoumean": "^1.2.1", - "inquirer": "^7.0.0", - "inquirer": "^6.2.1", - "json-fixer": "^1.3.1-0", + "inquirer": "^7.0.4", + "json-fixer": "^1.4.0", "lodash": "^4.11.2", "pify": "^4.0.1", "request": "^2.72.0", From 80b1fbd0b0d4b343543162affaf4ebb63c49d92f Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" <23040076+greenkeeper[bot]@users.noreply.github.com> Date: Sun, 16 Feb 2020 12:21:54 +0000 Subject: [PATCH 33/85] =?UTF-8?q?Update=20pify=20to=20the=20latest=20versi?= =?UTF-8?q?on=20=F0=9F=9A=80=20(#247)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a80fce51..70c4194d 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ "inquirer": "^7.0.4", "json-fixer": "^1.4.0", "lodash": "^4.11.2", - "pify": "^4.0.1", + "pify": "^5.0.0", "request": "^2.72.0", "yargs": "^15.0.1" }, From 8dd551a3d39f34fc2cf042404ba6e23289da7639 Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" <23040076+greenkeeper[bot]@users.noreply.github.com> Date: Mon, 17 Feb 2020 09:56:41 +0000 Subject: [PATCH 34/85] chore(package): update nock to version 12.0.0 (#248) --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 70c4194d..4fde2fae 100644 --- a/package.json +++ b/package.json @@ -58,7 +58,7 @@ "cz-conventional-changelog": "^2.1.0", "git-cz": "^3.0.0", "kcd-scripts": "^3.0.0", - "nock": "^11.1.0", + "nock": "^12.0.0", "semantic-release": "^15.13.2" }, "eslintIgnore": [ From b3d0995a65c2cca9c0132f14034123cbae93b2ff Mon Sep 17 00:00:00 2001 From: Alex Chan Date: Sun, 23 Feb 2020 17:32:21 +0000 Subject: [PATCH 35/85] feat(alpha-sort): Add a parameter contributorsSortAlphabetically (#249) This parameter allows the user to sort the list of contributors in alphabetical order of their name. --- src/cli.js | 6 ++++++ src/generate/__tests__/index.js | 20 ++++++++++++++++++++ src/generate/index.js | 5 +++++ 3 files changed, 31 insertions(+) diff --git a/src/cli.js b/src/cli.js index b07cfb72..91212b1d 100755 --- a/src/cli.js +++ b/src/cli.js @@ -35,6 +35,12 @@ const yargv = yargs .boolean('commit') .default('files', ['README.md']) .default('contributorsPerLine', 7) + .option('contributorsSortAlphabetically', { + type: 'boolean', + default: false, + description: + 'Sort the list of contributors alphabetically in the generated list', + }) .default('contributors', []) .default('config', defaultRCFile) .config('config', configPath => { diff --git a/src/generate/__tests__/index.js b/src/generate/__tests__/index.js index 5a8e3a12..15e5986e 100644 --- a/src/generate/__tests__/index.js +++ b/src/generate/__tests__/index.js @@ -60,6 +60,26 @@ test('split contributors into multiples lines when there are too many', () => { expect(result).toMatchSnapshot() }) +test('sorts the list of contributors if contributorsSortAlphabetically=true', () => { + const {kentcdodds, bogas04} = contributors + const {options, jfmengels, content} = fixtures() + + const resultPreSorted = generate( + options, + [bogas04, jfmengels, kentcdodds], + content, + ) + + options.contributorsSortAlphabetically = true + const resultAutoSorted = generate( + options, + [jfmengels, kentcdodds, bogas04], + content, + ) + + expect(resultPreSorted).toEqual(resultAutoSorted) +}) + test('not inject anything if there is no tags to inject content in', () => { const {kentcdodds} = contributors const {options} = fixtures() diff --git a/src/generate/index.js b/src/generate/index.js index 91125359..c5be533c 100644 --- a/src/generate/index.js +++ b/src/generate/index.js @@ -45,6 +45,11 @@ function formatLine(contributors) { function generateContributorsList(options, contributors) { return _.flow( + _.sortBy(function(contributor) { + if (options.contributorsSortAlphabetically) { + return contributor.name + } + }), _.map(function formatEveryContributor(contributor) { return formatContributor(options, contributor) }), From fe76178168bc07f72db086f3f68bee731a6b855a Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" <23040076+greenkeeper[bot]@users.noreply.github.com> Date: Thu, 2 Apr 2020 14:16:42 +0100 Subject: [PATCH 36/85] fix(package): update chalk to version 4.0.0 (#253) Co-authored-by: greenkeeper[bot] <23040076+greenkeeper[bot]@users.noreply.github.com> --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4fde2fae..8b8d2575 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "dependencies": { "@babel/runtime": "^7.7.6", "async": "^3.0.1", - "chalk": "^3.0.0", + "chalk": "^4.0.0", "didyoumean": "^1.2.1", "inquirer": "^7.0.4", "json-fixer": "^1.4.0", From 2de352a924f09ac5f767f675a02a152ef5c69406 Mon Sep 17 00:00:00 2001 From: Maximilian Berkmann Date: Sun, 12 Apr 2020 18:26:03 +0100 Subject: [PATCH 37/85] docs(license): MIT (#255) --- LICENSE.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 LICENSE.md diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 00000000..93a7c2f9 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,19 @@ +MIT License (MIT) Copyright (c) 2016 Kent C. Dodds, 2019 Jake Bolam, 2020 +Maximilian Berkmann + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. From a6715074defe2e4cb917dab3f331c57253758ab1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ila=C3=AF=20Deutel?= Date: Mon, 13 Apr 2020 07:39:15 -0700 Subject: [PATCH 38/85] docs: Add badge for the AUR package (#256) --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 1fe5261f..190cee9c 100644 --- a/README.md +++ b/README.md @@ -46,6 +46,7 @@ [![Code Coverage](https://img.shields.io/codecov/c/github/all-contributors/all-contributors-cli.svg)](https://codecov.io/github/all-contributors/all-contributors-cli) [![Version](https://img.shields.io/npm/v/all-contributors-cli.svg)](https://www.npmjs.com/package/all-contributors-cli) [![Downloads](https://img.shields.io/npm/dm/all-contributors-cli.svg)](http://www.npmtrends.com/all-contributors-cli) +[![AUR Version](https://img.shields.io/aur/version/all-contributors-cli.svg)](https://aur.archlinux.org/packages/all-contributors-cli) [![All Contributors](https://img.shields.io/badge/all_contributors-37-orange.svg?style=flat-square)](#contributors-) [![Star on Github](https://img.shields.io/github/stars/all-contributors/all-contributors-cli.svg?style=social)](https://github.com/all-contributors/all-contributors-cli/stargazers) From db5d731d964102aa7bd88ae280dd93160b2e31c9 Mon Sep 17 00:00:00 2001 From: Andrew Lisowski Date: Fri, 17 Apr 2020 10:20:41 -0700 Subject: [PATCH 39/85] fix(repo): pass optionalPrivateToken to recursive calls (#258) --- src/repo/github.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/repo/github.js b/src/repo/github.js index 6cb8272a..bde0e930 100644 --- a/src/repo/github.js +++ b/src/repo/github.js @@ -66,9 +66,11 @@ function getContributorsPage(githubUrl, optionalPrivateToken) { const nextLink = getNextLink(res.headers.link) if (nextLink) { - return getContributorsPage(nextLink).then(nextContributors => { - return contributorsIds.concat(nextContributors) - }) + return getContributorsPage(nextLink, optionalPrivateToken).then( + nextContributors => { + return contributorsIds.concat(nextContributors) + }, + ) } return contributorsIds From 9a6cf198196954dd194a807534934d03f6be8e68 Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" <23040076+greenkeeper[bot]@users.noreply.github.com> Date: Sun, 24 May 2020 00:07:21 +0100 Subject: [PATCH 40/85] chore(package): update kcd-scripts to version 5.0.0 (#246) Co-authored-by: greenkeeper[bot] <23040076+greenkeeper[bot]@users.noreply.github.com> Co-authored-by: Maximilian Berkmann --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 8b8d2575..2e1b30e4 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,7 @@ "codecov": "^3.1.0", "cz-conventional-changelog": "^2.1.0", "git-cz": "^3.0.0", - "kcd-scripts": "^3.0.0", + "kcd-scripts": "^5.0.0", "nock": "^12.0.0", "semantic-release": "^15.13.2" }, From d26cd47c817ffbbcdc7362b50c0d066fc2820975 Mon Sep 17 00:00:00 2001 From: "allcontributors[bot]" <46447321+allcontributors[bot]@users.noreply.github.com> Date: Sun, 24 May 2020 01:43:59 +0100 Subject: [PATCH 41/85] docs: add MarceloAlves as a contributor (#222) * docs: update README.md * docs: update .all-contributorsrc * docs(readme): re-generated the table * docs(readme): table fix * fix(generate): experimental fix Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> Co-authored-by: Berkmann18 --- .all-contributorsrc | 3 ++- README.md | 14 ++++++++------ src/generate/index.js | 2 +- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/.all-contributorsrc b/.all-contributorsrc index efc7524b..cdd56bbe 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -369,7 +369,8 @@ "avatar_url": "https://avatars1.githubusercontent.com/u/216782?v=4", "profile": "https://github.com/marceloalves", "contributions": [ - "code" + "code", + "test" ] }, { diff --git a/README.md b/README.md index 190cee9c..f7902228 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,12 @@ -- [The problem](#the-problem) -- [This solution](#this-solution) -- [Using the all-contributors-cli](#using-the-all-contributors-cli) -- [Contributors ✨](#contributors-%e2%9c%a8) -- [LICENSE](#license) +- [ all-contributors-cli ](#all-contributors-cli) + - [The problem](#the-problem) + - [This solution](#this-solution) + - [Using the all-contributors-cli](#using-the-all-contributors-cli) + - [Contributors ✨](#contributors-) + - [LICENSE](#license) @@ -128,7 +129,7 @@ Thanks goes to these wonderful people
Fabrizio

πŸ› πŸ’» -
Marcelo Alves

πŸ’» +
Marcelo Alves

πŸ’» ⚠️
Nicolas Goutay

πŸ’»
Tyler Krupicka

πŸ’» ⚠️
Stefano Moia

πŸ’» @@ -137,6 +138,7 @@ Thanks goes to these wonderful people + This project follows the diff --git a/src/generate/index.js b/src/generate/index.js index c5be533c..8cbb4142 100644 --- a/src/generate/index.js +++ b/src/generate/index.js @@ -45,7 +45,7 @@ function formatLine(contributors) { function generateContributorsList(options, contributors) { return _.flow( - _.sortBy(function(contributor) { + _.sortBy(contributor => { if (options.contributorsSortAlphabetically) { return contributor.name } From e2ed91d19f1416ecd1dacc9690aa8424d67dd7ed Mon Sep 17 00:00:00 2001 From: "allcontributors[bot]" <46447321+allcontributors[bot]@users.noreply.github.com> Date: Sun, 24 May 2020 01:57:11 +0100 Subject: [PATCH 42/85] docs: add ilai-deutel as a contributor (#257) * docs: update README.md [skip ci] * docs: update .all-contributorsrc [skip ci] Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> Co-authored-by: Maximilian Berkmann --- .all-contributorsrc | 9 +++++++++ README.md | 1 + 2 files changed, 10 insertions(+) diff --git a/.all-contributorsrc b/.all-contributorsrc index cdd56bbe..b20ed50d 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -400,6 +400,15 @@ "contributions": [ "code" ] + }, + { + "login": "ilai-deutel", + "name": "IlaΓ― Deutel", + "avatar_url": "https://avatars0.githubusercontent.com/u/10098207?v=4", + "profile": "https://github.com/ilai-deutel", + "contributions": [ + "platform" + ] } ], "skipCi": true diff --git a/README.md b/README.md index f7902228..54656ca4 100644 --- a/README.md +++ b/README.md @@ -133,6 +133,7 @@ Thanks goes to these wonderful people
Nicolas Goutay

πŸ’»
Tyler Krupicka

πŸ’» ⚠️
Stefano Moia

πŸ’» +
IlaΓ― Deutel

πŸ“¦ From b5d85de2f5fe158174dfa729d9d4282f97328347 Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" <23040076+greenkeeper[bot]@users.noreply.github.com> Date: Sun, 24 May 2020 01:59:38 +0100 Subject: [PATCH 43/85] chore(package): update git-cz to version 4.1.0 (#243) Co-authored-by: greenkeeper[bot] <23040076+greenkeeper[bot]@users.noreply.github.com> Co-authored-by: Maximilian Berkmann --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2e1b30e4..06019d37 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "devDependencies": { "codecov": "^3.1.0", "cz-conventional-changelog": "^2.1.0", - "git-cz": "^3.0.0", + "git-cz": "^4.1.0", "kcd-scripts": "^5.0.0", "nock": "^12.0.0", "semantic-release": "^15.13.2" From 77923a3fcce8f52876299bbf19c836c833fd7597 Mon Sep 17 00:00:00 2001 From: "allcontributors[bot]" <46447321+allcontributors[bot]@users.noreply.github.com> Date: Sun, 24 May 2020 02:02:03 +0100 Subject: [PATCH 44/85] docs: add kharaone as a contributor (#212) * docs: update README.md * docs: update .all-contributorsrc * docs(readme): re-generated the table Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> Co-authored-by: Maximilian Berkmann --- .all-contributorsrc | 9 +++++++++ README.md | 1 + 2 files changed, 10 insertions(+) diff --git a/.all-contributorsrc b/.all-contributorsrc index b20ed50d..c3143af9 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -363,6 +363,15 @@ "code" ] }, + { + "login": "kharaone", + "name": "kharaone", + "avatar_url": "https://avatars1.githubusercontent.com/u/6599271?v=4", + "profile": "https://github.com/kharaone", + "contributions": [ + "code" + ] + }, { "login": "MarceloAlves", "name": "Marcelo Alves", diff --git a/README.md b/README.md index 54656ca4..3e2d9497 100644 --- a/README.md +++ b/README.md @@ -129,6 +129,7 @@ Thanks goes to these wonderful people
Fabrizio

πŸ› πŸ’» +
kharaone

πŸ’»
Marcelo Alves

πŸ’» ⚠️
Nicolas Goutay

πŸ’»
Tyler Krupicka

πŸ’» ⚠️ From 33e1a435d379b4b9e8cc763062390a8be24415dd Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" <23040076+greenkeeper[bot]@users.noreply.github.com> Date: Sun, 24 May 2020 02:04:08 +0100 Subject: [PATCH 45/85] chore(package): update semantic-release to version 16.0.0 (#242) Co-authored-by: greenkeeper[bot] <23040076+greenkeeper[bot]@users.noreply.github.com> Co-authored-by: Maximilian Berkmann --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 06019d37..d84d1114 100644 --- a/package.json +++ b/package.json @@ -59,7 +59,7 @@ "git-cz": "^4.1.0", "kcd-scripts": "^5.0.0", "nock": "^12.0.0", - "semantic-release": "^15.13.2" + "semantic-release": "^16.0.0" }, "eslintIgnore": [ "node_modules", From 4573e29d50a277f14228b3349059a3b780100685 Mon Sep 17 00:00:00 2001 From: "allcontributors[bot]" <46447321+allcontributors[bot]@users.noreply.github.com> Date: Sun, 24 May 2020 02:06:42 +0100 Subject: [PATCH 46/85] docs: add AnandChowdhary as a contributor (#219) * docs: update README.md * docs: update .all-contributorsrc * docs(readme): re-generated the table * docs(readme): re-generated the table * fix: undid the fuck up Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> Co-authored-by: Berkmann18 --- .all-contributorsrc | 11 +++++++++++ README.md | 1 + 2 files changed, 12 insertions(+) diff --git a/.all-contributorsrc b/.all-contributorsrc index c3143af9..a1ffc17c 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -382,6 +382,17 @@ "test" ] }, + { + "login": "AnandChowdhary", + "name": "Anand Chowdhary", + "avatar_url": "https://avatars3.githubusercontent.com/u/2841780?v=4", + "profile": "https://anandchowdhary.com/?utm_source=github&utm_campaign=about-link", + "contributions": [ + "test", + "bug", + "code" + ] + }, { "login": "phacks", "name": "Nicolas Goutay", diff --git a/README.md b/README.md index 3e2d9497..ef78eb48 100644 --- a/README.md +++ b/README.md @@ -131,6 +131,7 @@ Thanks goes to these wonderful people
Fabrizio

πŸ› πŸ’»
kharaone

πŸ’»
Marcelo Alves

πŸ’» ⚠️ +
Anand Chowdhary

⚠️ πŸ› πŸ’»
Nicolas Goutay

πŸ’»
Tyler Krupicka

πŸ’» ⚠️
Stefano Moia

πŸ’» From e987eb01a3c8c03f53c6f24d6cf3479f1759f505 Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" <23040076+greenkeeper[bot]@users.noreply.github.com> Date: Sun, 24 May 2020 02:10:15 +0100 Subject: [PATCH 47/85] chore(package): update cz-conventional-changelog to version 3.0.0 (#198) Co-authored-by: greenkeeper[bot] <23040076+greenkeeper[bot]@users.noreply.github.com> Co-authored-by: Maximilian Berkmann --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d84d1114..2a999c1c 100644 --- a/package.json +++ b/package.json @@ -55,7 +55,7 @@ }, "devDependencies": { "codecov": "^3.1.0", - "cz-conventional-changelog": "^2.1.0", + "cz-conventional-changelog": "^3.0.0", "git-cz": "^4.1.0", "kcd-scripts": "^5.0.0", "nock": "^12.0.0", From bcc0d99fd04a6be3424a158455688d83428e5791 Mon Sep 17 00:00:00 2001 From: Maximilian Berkmann Date: Sun, 24 May 2020 18:46:50 +0100 Subject: [PATCH 48/85] feat(contribution-types): add missing contribution types (#261) --- src/util/contribution-types.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/util/contribution-types.js b/src/util/contribution-types.js index 5db6ddc6..7df34571 100644 --- a/src/util/contribution-types.js +++ b/src/util/contribution-types.js @@ -7,6 +7,10 @@ const defaultTypes = function(repoType) { symbol: '️️️️♿️', description: 'Accessibility', }, + audio: { + symbol: 'πŸ”Š', + description: 'Audio', + }, blog: { symbol: 'πŸ“', description: 'Blogposts', From 649f6ceebc9a2f80117810aca93dba4546aba8d2 Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" <23040076+greenkeeper[bot]@users.noreply.github.com> Date: Sun, 24 May 2020 21:30:48 +0100 Subject: [PATCH 49/85] chore(package): update semantic-release to version 17.0.8 (#262) Co-authored-by: greenkeeper[bot] <23040076+greenkeeper[bot]@users.noreply.github.com> --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2a999c1c..162ff232 100644 --- a/package.json +++ b/package.json @@ -59,7 +59,7 @@ "git-cz": "^4.1.0", "kcd-scripts": "^5.0.0", "nock": "^12.0.0", - "semantic-release": "^16.0.0" + "semantic-release": "^17.0.8" }, "eslintIgnore": [ "node_modules", From b77f86bf7f71936475b344867d61010bca1f1c97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20St=C4=99pniewski?= Date: Sun, 7 Jun 2020 22:38:12 +0200 Subject: [PATCH 50/85] feat(repo): github profile url should be valid (#268) * feat(repo): github profile url should be valid * docs: add k3nsei as a contributor --- .all-contributorsrc | 11 +++++++++ README.md | 4 +++- src/repo/github.js | 5 ++-- src/util/__tests__/url.js | 49 +++++++++++++++++++++++++++++++++++++++ src/util/index.js | 1 + src/util/url.js | 33 ++++++++++++++++++++++++++ 6 files changed, 100 insertions(+), 3 deletions(-) create mode 100644 src/util/__tests__/url.js create mode 100644 src/util/url.js diff --git a/.all-contributorsrc b/.all-contributorsrc index a1ffc17c..56b7d7df 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -429,6 +429,17 @@ "contributions": [ "platform" ] + }, + { + "login": "k3nsei", + "name": "Piotr StΔ™pniewski", + "avatar_url": "https://avatars2.githubusercontent.com/u/190422?v=4", + "profile": "https://github.com/k3nsei", + "contributions": [ + "bug", + "code", + "test" + ] } ], "skipCi": true diff --git a/README.md b/README.md index ef78eb48..0adb5bcb 100644 --- a/README.md +++ b/README.md @@ -134,14 +134,16 @@ Thanks goes to these wonderful people
Anand Chowdhary

⚠️ πŸ› πŸ’»
Nicolas Goutay

πŸ’»
Tyler Krupicka

πŸ’» ⚠️ + +
Stefano Moia

πŸ’»
IlaΓ― Deutel

πŸ“¦ +
Piotr StΔ™pniewski

πŸ› πŸ’» ⚠️ - This project follows the diff --git a/src/repo/github.js b/src/repo/github.js index bde0e930..c1d297be 100644 --- a/src/repo/github.js +++ b/src/repo/github.js @@ -1,6 +1,7 @@ const url = require('url') const pify = require('pify') const request = pify(require('request')) +const { parseHttpUrl, isValidHttpUrl } = require('../util/url') /** * Get the host based on public or enterprise GitHub. @@ -93,7 +94,7 @@ const getUserInfo = function(username, hostname, optionalPrivateToken) { .then(res => { const body = JSON.parse(res.body) - let profile = body.blog || body.html_url + let profile = isValidHttpUrl(body.blog) ? body.blog : body.html_url // Check for authentication required if ( @@ -112,7 +113,7 @@ const getUserInfo = function(username, hostname, optionalPrivateToken) { ) } - profile = profile.startsWith('http') ? profile : `http://${profile}` + profile = parseHttpUrl(profile) return { login: body.login, diff --git a/src/util/__tests__/url.js b/src/util/__tests__/url.js new file mode 100644 index 00000000..50ff6d4d --- /dev/null +++ b/src/util/__tests__/url.js @@ -0,0 +1,49 @@ +import url from '../url'; + +test(`Result of protocol validation should be true`, () => { + expect(url.isHttpProtocol('http:')).toBe(true) + expect(url.isHttpProtocol('https:')).toBe(true) +}) + +test(`Result of protocol validation should be false`, () => { + expect(url.isHttpProtocol('ftp:')).toBe(false) +}) + +test(`Result of url validation should be true`, () => { + expect(url.isValidHttpUrl('https://github.com/gitapi/users/octocat')).toBe(true) +}) + +test(`Result of url validation should be false when url uses wrong protocol`, () => { + expect(url.isValidHttpUrl('git://git@github.com:all-contributors/all-contributors-cli.git')).toBe(false) +}) + +test(`Result of url validation should be false when input isn't url`, () => { + expect(url.isValidHttpUrl('github-octocat')).toBe(false) +}) + +test(`Result of parsed url should be equal`, () => { + const input = 'https://github.com/gitapi/users/octocat' + const expected = 'https://github.com/gitapi/users/octocat' + expect(url.parseHttpUrl(input)).toBe(expected) +}) + +test(`Result of parsed url without protocol should be equal`, () => { + const input = 'example.com' + const expected = 'http://example.com/' + expect(url.parseHttpUrl(input)).toBe(expected) +}) + +test(`Throw an error when parsed input isn't a string`, () => { + const input = 123 + expect(url.parseHttpUrl.bind(null, input)).toThrowError('input must be a string') +}) + +test(`Throw an error when parsed url has wrong protocol`, () => { + const input = 'ftp://domain.xyz' + expect(url.parseHttpUrl.bind(null, input)).toThrowError('Provided URL has an invalid protocol') +}) + +test(`Throw an error when parsed input isn't a URL`, () => { + const input = 'some string' + expect(url.parseHttpUrl.bind(null, input)).toThrowError('Invalid URL: http://some string') +}) diff --git a/src/util/index.js b/src/util/index.js index a58592d7..9cb53145 100644 --- a/src/util/index.js +++ b/src/util/index.js @@ -3,4 +3,5 @@ module.exports = { contributionTypes: require('./contribution-types'), git: require('./git'), markdown: require('./markdown'), + url: require('./url'), } diff --git a/src/util/url.js b/src/util/url.js new file mode 100644 index 00000000..348cbdda --- /dev/null +++ b/src/util/url.js @@ -0,0 +1,33 @@ +function isHttpProtocol(input) { + return new RegExp('^https?\\:?$').test(input) +} + +function isValidHttpUrl(input) { + try { + const url = new URL(input) + + return isHttpProtocol(url.protocol) + } catch (e) { + return false + } +} + +function parseHttpUrl(input) { + if (typeof input !== 'string') { + throw new TypeError('input must be a string') + } + + const url = new URL(new RegExp('^\\w+\\:\\/\\/').test(input) ? input : `http://${input}`) + + if (!isHttpProtocol(url.protocol)) { + throw new TypeError('Provided URL has an invalid protocol') + } + + return url.toString() +} + +module.exports = { + isHttpProtocol, + isValidHttpUrl, + parseHttpUrl +} From e73693827d859cb3722f710d1bb2b076e6f653a2 Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" <23040076+greenkeeper[bot]@users.noreply.github.com> Date: Sat, 27 Jun 2020 20:36:20 +0100 Subject: [PATCH 51/85] chore(package): update kcd-scripts to version 6.2.0 (#263) Co-authored-by: greenkeeper[bot] <23040076+greenkeeper[bot]@users.noreply.github.com> Co-authored-by: Maximilian Berkmann --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 162ff232..c7a3822a 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,7 @@ "codecov": "^3.1.0", "cz-conventional-changelog": "^3.0.0", "git-cz": "^4.1.0", - "kcd-scripts": "^5.0.0", + "kcd-scripts": "^6.2.0", "nock": "^12.0.0", "semantic-release": "^17.0.8" }, From e48419c1db6b90ad00533badf6f579cbde021b5c Mon Sep 17 00:00:00 2001 From: Maximilian Berkmann Date: Sun, 28 Jun 2020 17:05:21 +0100 Subject: [PATCH 52/85] chore(dep): bumped json-fixer to 1.5.1 (#270) I introduced bug and security fixes (and minor improvements) and I think it would be worthwhile for this package to use a more up-to-date version. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c7a3822a..9b570640 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "chalk": "^4.0.0", "didyoumean": "^1.2.1", "inquirer": "^7.0.4", - "json-fixer": "^1.4.0", + "json-fixer": "^1.5.1", "lodash": "^4.11.2", "pify": "^5.0.0", "request": "^2.72.0", From b70d5f3d5d5eef683b2fa48aa46e2ffef5185855 Mon Sep 17 00:00:00 2001 From: "allcontributors[bot]" <46447321+allcontributors[bot]@users.noreply.github.com> Date: Sun, 28 Jun 2020 17:46:50 +0100 Subject: [PATCH 53/85] docs: adds missing contributors (#272) * docs: update README.md [skip ci] * docs: update .all-contributorsrc [skip ci] * docs: added missing contributions Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> Co-authored-by: Berkmann18 --- .all-contributorsrc | 29 +++++++++++++++++++++++++++-- README.md | 7 +++++-- 2 files changed, 32 insertions(+), 4 deletions(-) diff --git a/.all-contributorsrc b/.all-contributorsrc index 56b7d7df..c7f56c6b 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -258,7 +258,9 @@ "infra", "code", "doc", - "test" + "test", + "review", + "question" ] }, { @@ -269,7 +271,11 @@ "contributions": [ "code", "test", - "doc" + "doc", + "tool", + "maintenance", + "review", + "question" ] }, { @@ -440,6 +446,25 @@ "code", "test" ] + }, + { + "login": "gr2m", + "name": "Gregor Martynus", + "avatar_url": "https://avatars3.githubusercontent.com/u/39992?v=4", + "profile": "https://dev.to/gr2m", + "contributions": [ + "review", + "question" + ] + }, + { + "login": "sinchang", + "name": "Jeff Wen", + "avatar_url": "https://avatars0.githubusercontent.com/u/3297859?v=4", + "profile": "https://sinchang.me/", + "contributions": [ + "review" + ] } ], "skipCi": true diff --git a/README.md b/README.md index 0adb5bcb..4f297cd7 100644 --- a/README.md +++ b/README.md @@ -113,8 +113,8 @@ Thanks goes to these wonderful people
Dura

πŸ“– -
Jake Bolam

πŸš‡ πŸ’» πŸ“– ⚠️ -
Maximilian Berkmann

πŸ’» ⚠️ πŸ“– +
Jake Bolam

πŸš‡ πŸ’» πŸ“– ⚠️ πŸ‘€ πŸ’¬ +
Maximilian Berkmann

πŸ’» ⚠️ πŸ“– πŸ”§ 🚧 πŸ‘€ πŸ’¬
tbenning

🎨
ehmicky

πŸ’»
James George

πŸ’» @@ -139,11 +139,14 @@ Thanks goes to these wonderful people
Stefano Moia

πŸ’»
IlaΓ― Deutel

πŸ“¦
Piotr StΔ™pniewski

πŸ› πŸ’» ⚠️ +
Gregor Martynus

πŸ‘€ πŸ’¬ +
Jeff Wen

πŸ‘€ + This project follows the From fc2d05e6b9c6c6a5360d9de9c521e341a96f0d4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Kowalski?= Date: Sun, 28 Jun 2020 18:58:51 +0200 Subject: [PATCH 54/85] perf: add image size to avatar url to improve performance (#269) Co-authored-by: Maximilian Berkmann --- src/generate/__tests__/format-contributor.js | 11 +++++------ src/generate/format-contributor.js | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/generate/__tests__/format-contributor.js b/src/generate/__tests__/format-contributor.js index a2fc80e5..013318a7 100644 --- a/src/generate/__tests__/format-contributor.js +++ b/src/generate/__tests__/format-contributor.js @@ -20,7 +20,7 @@ test('format a simple contributor', () => { const {options} = fixtures() const expected = - '
Kent C. Dodds

πŸ‘€' + '
Kent C. Dodds

πŸ‘€' expect(formatContributor(options, contributor)).toBe(expected) }) @@ -30,7 +30,7 @@ test('format contributor with complex contribution types', () => { const {options} = fixtures() const expected = - '
Kent C. Dodds

πŸ“– πŸ‘€ πŸ’¬' + '
Kent C. Dodds

πŸ“– πŸ‘€ πŸ’¬' expect(formatContributor(options, contributor)).toBe(expected) }) @@ -53,8 +53,7 @@ test('default image size to 100', () => { delete options.imageSize const expected = - '
Kent C. Dodds

πŸ‘€' - + '
Kent C. Dodds

πŸ‘€' expect(formatContributor(options, contributor)).toBe(expected) }) @@ -64,7 +63,7 @@ test('format contributor with pipes in their name', () => { const {options} = fixtures() const expected = - '
Who | Needs | Pipes?

πŸ“–' + '
Who | Needs | Pipes?

πŸ“–' expect(formatContributor(options, contributor)).toBe(expected) }) @@ -74,7 +73,7 @@ test('format contributor with no github account', () => { const {options} = fixtures() const expected = - '
No Github Account
🌍' + '
No Github Account
🌍' expect(formatContributor(options, contributor)).toBe(expected) }) diff --git a/src/generate/format-contributor.js b/src/generate/format-contributor.js index 63716f2d..048d63db 100644 --- a/src/generate/format-contributor.js +++ b/src/generate/format-contributor.js @@ -2,7 +2,7 @@ const _ = require('lodash/fp') const formatContributionType = require('./format-contribution-type') const avatarTemplate = _.template( - '', + '', ) const avatarBlockTemplate = _.template( '<%= avatar %>
<%= name %>
', From bd4bea101e1258d1402735d0e3650b503c2451bd Mon Sep 17 00:00:00 2001 From: "allcontributors[bot]" <46447321+allcontributors[bot]@users.noreply.github.com> Date: Sun, 28 Jun 2020 19:23:56 +0100 Subject: [PATCH 55/85] docs: add pavelloz as a contributor (#273) * docs: update README.md [skip ci] * docs: update .all-contributorsrc [skip ci] Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> --- .all-contributorsrc | 9 +++++++++ README.md | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.all-contributorsrc b/.all-contributorsrc index c7f56c6b..55828fd2 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -465,6 +465,15 @@ "contributions": [ "review" ] + }, + { + "login": "pavelloz", + "name": "PaweΕ‚ Kowalski", + "avatar_url": "https://avatars1.githubusercontent.com/u/546845?v=4", + "profile": "https://github.com/pavelloz", + "contributions": [ + "code" + ] } ], "skipCi": true diff --git a/README.md b/README.md index 4f297cd7..4502a396 100644 --- a/README.md +++ b/README.md @@ -141,12 +141,12 @@ Thanks goes to these wonderful people
Piotr StΔ™pniewski

πŸ› πŸ’» ⚠️
Gregor Martynus

πŸ‘€ πŸ’¬
Jeff Wen

πŸ‘€ +
PaweΕ‚ Kowalski

πŸ’» - This project follows the From 3bb4a030085b730d2cf4684bd74063cb1eeb50db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20L=C3=B6ning?= Date: Fri, 24 Jul 2020 13:37:44 +0100 Subject: [PATCH 56/85] feat(contribution-types): adds mentoring (#274) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: 🎸 Add mentoring * style: remove white spaces --- src/util/contribution-types.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/util/contribution-types.js b/src/util/contribution-types.js index 7df34571..7cefd72c 100644 --- a/src/util/contribution-types.js +++ b/src/util/contribution-types.js @@ -74,6 +74,10 @@ const defaultTypes = function(repoType) { symbol: '🚧', description: 'Maintenance', }, + mentoring: { + symbol: 'πŸ§‘β€πŸ«', + description: 'Mentoring', + }, platform: { symbol: 'πŸ“¦', description: 'Packaging/porting to new platform', From 8af13c3f5e988491b4154c5d429a3c2d2367ed5e Mon Sep 17 00:00:00 2001 From: David Anson Date: Fri, 14 Aug 2020 02:18:31 -0700 Subject: [PATCH 57/85] fix: replace markdownlint-enable with markdownlint-restore to restore (vs. enable all) previous rules (fixes #276). (#278) --- README.md | 2 +- src/generate/__tests__/__snapshots__/index.js.snap | 4 ++-- src/generate/__tests__/index.js | 2 +- src/generate/index.js | 2 +- .../__tests__/__snapshots__/add-contributors-list.js.snap | 6 +++--- src/init/init-content.js | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 4502a396..2c45b3e6 100644 --- a/README.md +++ b/README.md @@ -145,7 +145,7 @@ Thanks goes to these wonderful people - + diff --git a/src/generate/__tests__/__snapshots__/index.js.snap b/src/generate/__tests__/__snapshots__/index.js.snap index ba2c6e03..bc42607f 100644 --- a/src/generate/__tests__/__snapshots__/index.js.snap +++ b/src/generate/__tests__/__snapshots__/index.js.snap @@ -18,7 +18,7 @@ These people contributed to the project: - + @@ -49,7 +49,7 @@ These people contributed to the project: - + diff --git a/src/generate/__tests__/index.js b/src/generate/__tests__/index.js index 15e5986e..a922b381 100644 --- a/src/generate/__tests__/index.js +++ b/src/generate/__tests__/index.js @@ -141,7 +141,7 @@ test('inject nothing if there are no contributors', () => { '', '', '', - '', + '', '', '', '', diff --git a/src/generate/index.js b/src/generate/index.js index 8cbb4142..549f8ea5 100644 --- a/src/generate/index.js +++ b/src/generate/index.js @@ -29,7 +29,7 @@ function injectListBetweenTags(newContent) { '\n', '\n', newContent, - '', + '', '\n', '\n', previousContent.slice(startOfClosingTagIndex), diff --git a/src/init/__tests__/__snapshots__/add-contributors-list.js.snap b/src/init/__tests__/__snapshots__/add-contributors-list.js.snap index 5500e598..c528a5a1 100644 --- a/src/init/__tests__/__snapshots__/add-contributors-list.js.snap +++ b/src/init/__tests__/__snapshots__/add-contributors-list.js.snap @@ -9,7 +9,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d - + @@ -27,7 +27,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d - + @@ -44,7 +44,7 @@ Description - + " `; diff --git a/src/init/init-content.js b/src/init/init-content.js index f772eb30..7e75426c 100644 --- a/src/init/init-content.js +++ b/src/init/init-content.js @@ -13,7 +13,7 @@ const listContent = [ '', '', '', - '', + '', '', '', ].join('\n') From 74f3b710a6ff9777c09c5e67921f212244336b5c Mon Sep 17 00:00:00 2001 From: Jeroen Claassens Date: Fri, 14 Aug 2020 11:21:34 +0200 Subject: [PATCH 58/85] refactor: move from "request" to "node fetch" (#277) * feat: migrate from request to node-fetch * docs(readme): add favna for all contributors * fix: forgot to refactor this one * style(gitlab): fixed formatting issues Co-authored-by: Berkmann18 --- .all-contributorsrc | 9 ++++ README.md | 100 +++++++++++++++++++++++--------------------- package.json | 2 +- src/repo/github.js | 59 ++++++++++++-------------- src/repo/gitlab.js | 81 ++++++++++++++++------------------- 5 files changed, 124 insertions(+), 127 deletions(-) diff --git a/.all-contributorsrc b/.all-contributorsrc index 55828fd2..9d65158e 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -474,6 +474,15 @@ "contributions": [ "code" ] + }, + { + "login": "Favna", + "name": "Jeroen Claassens", + "avatar_url": "https://avatars3.githubusercontent.com/u/4019718?v=4", + "profile": "https://favware.tech/", + "contributions": [ + "code" + ] } ], "skipCi": true diff --git a/README.md b/README.md index 2c45b3e6..2dd08f56 100644 --- a/README.md +++ b/README.md @@ -80,73 +80,77 @@ Thanks goes to these wonderful people - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + + + +

Jeroen Engels

πŸ’» πŸ“– ⚠️

Kent C. Dodds

πŸ“– πŸ’»

JoΓ£o GuimarΓ£es

πŸ’»

Ben Briggs

πŸ’»

Itai Steinherz

πŸ“– πŸ’»

Alex Jover

πŸ’» πŸ“–

Jeroen Engels

πŸ’» πŸ“– ⚠️

Kent C. Dodds

πŸ“– πŸ’»

JoΓ£o GuimarΓ£es

πŸ’»

Ben Briggs

πŸ’»

Itai Steinherz

πŸ“– πŸ’»

Alex Jover

πŸ’» πŸ“–

Jerod Santo

πŸ’»

Kevin Jalbert

πŸ’»

tunnckoCore

πŸ”§

Mehdi Achour

πŸ’»

Roy Revelt

πŸ›

Chris Vickery

πŸ’»

Jerod Santo

πŸ’»

Kevin Jalbert

πŸ’»

tunnckoCore

πŸ”§

Mehdi Achour

πŸ’»

Roy Revelt

πŸ›

Chris Vickery

πŸ’»

Bryce Reynolds

πŸ’»

James, please

πŸ€” πŸ’»

Spyros Ioakeimidis

πŸ’»

Fernando Costa

πŸ’»

snipe

πŸ“–

Gant Laborde

πŸ’»

Bryce Reynolds

πŸ’»

James, please

πŸ€” πŸ’»

Spyros Ioakeimidis

πŸ’»

Fernando Costa

πŸ’»

snipe

πŸ“–

Gant Laborde

πŸ’»

Md Zubair Ahmed

πŸ“– πŸ› πŸ’» ⚠️

Divjot Singh

πŸ“–

JoΓ£o Marques

πŸ’» πŸ“– πŸ€”

Andrew Lisowski

πŸ’» πŸ“– ⚠️

Xianming Zhong

πŸ“–

C.Y.Xu

πŸ’»

Md Zubair Ahmed

πŸ“– πŸ› πŸ’» ⚠️

Divjot Singh

πŸ“–

JoΓ£o Marques

πŸ’» πŸ“– πŸ€”

Andrew Lisowski

πŸ’» πŸ“– ⚠️

Xianming Zhong

πŸ“–

C.Y.Xu

πŸ’»

Dura

πŸ“–

Jake Bolam

πŸš‡ πŸ’» πŸ“– ⚠️ πŸ‘€ πŸ’¬

Maximilian Berkmann

πŸ’» ⚠️ πŸ“– πŸ”§ 🚧 πŸ‘€ πŸ’¬

tbenning

🎨

ehmicky

πŸ’»

James George

πŸ’»

Dura

πŸ“–

Jake Bolam

πŸš‡ πŸ’» πŸ“– ⚠️ πŸ‘€ πŸ’¬

Maximilian Berkmann

πŸ’» ⚠️ πŸ“– πŸ”§ 🚧 πŸ‘€ πŸ’¬

tbenning

🎨

ehmicky

πŸ’»

James George

πŸ’»

Nick Schonning

πŸ’»

Cezar Augusto

πŸ“–

Jeppe Reinhold

πŸ’»

Rachel M. Carmena

πŸ’»

simon3000

⚠️

SnOβ‚‚WMaN

πŸ’»

Nick Schonning

πŸ’»

Cezar Augusto

πŸ“–

Jeppe Reinhold

πŸ’»

Rachel M. Carmena

πŸ’»

simon3000

⚠️

SnOβ‚‚WMaN

πŸ’»

Fabrizio

πŸ› πŸ’»

kharaone

πŸ’»

Marcelo Alves

πŸ’» ⚠️

Anand Chowdhary

⚠️ πŸ› πŸ’»

Nicolas Goutay

πŸ’»

Tyler Krupicka

πŸ’» ⚠️

Fabrizio

πŸ› πŸ’»

kharaone

πŸ’»

Marcelo Alves

πŸ’» ⚠️

Anand Chowdhary

⚠️ πŸ› πŸ’»

Nicolas Goutay

πŸ’»

Tyler Krupicka

πŸ’» ⚠️

Stefano Moia

πŸ’»

IlaΓ― Deutel

πŸ“¦

Piotr StΔ™pniewski

πŸ› πŸ’» ⚠️

Gregor Martynus

πŸ‘€ πŸ’¬

Jeff Wen

πŸ‘€

PaweΕ‚ Kowalski

πŸ’»

Stefano Moia

πŸ’»

IlaΓ― Deutel

πŸ“¦

Piotr StΔ™pniewski

πŸ› πŸ’» ⚠️

Gregor Martynus

πŸ‘€ πŸ’¬

Jeff Wen

πŸ‘€

PaweΕ‚ Kowalski

πŸ’»

Jeroen Claassens

πŸ’»
+ This project follows the diff --git a/package.json b/package.json index 9b570640..1f2364dd 100644 --- a/package.json +++ b/package.json @@ -49,8 +49,8 @@ "inquirer": "^7.0.4", "json-fixer": "^1.5.1", "lodash": "^4.11.2", + "node-fetch": "^2.6.0", "pify": "^5.0.0", - "request": "^2.72.0", "yargs": "^15.0.1" }, "devDependencies": { diff --git a/src/repo/github.js b/src/repo/github.js index c1d297be..990f7baf 100644 --- a/src/repo/github.js +++ b/src/repo/github.js @@ -1,7 +1,6 @@ const url = require('url') -const pify = require('pify') -const request = pify(require('request')) -const { parseHttpUrl, isValidHttpUrl } = require('../util/url') +const fetch = require('node-fetch') +const {parseHttpUrl, isValidHttpUrl} = require('../util/url') /** * Get the host based on public or enterprise GitHub. @@ -23,16 +22,16 @@ function getApiHost(hostname) { return hostname.replace(/:\/\//, '://api.') } -function getRequestHeaders(optionalPrivateToken = '') { - const requestHeaders = { - 'User-Agent': 'request', +function getFetchHeaders(optionalPrivateToken = '') { + const fetchHeaders = { + 'User-Agent': 'node-fetch', } if (optionalPrivateToken && optionalPrivateToken.length > 0) { - requestHeaders.Authorization = `token ${optionalPrivateToken}` + fetchHeaders.Authorization = `token ${optionalPrivateToken}` } - return requestHeaders + return fetchHeaders } function getNextLink(link) { @@ -50,22 +49,20 @@ function getNextLink(link) { } function getContributorsPage(githubUrl, optionalPrivateToken) { - return request - .get({ - url: githubUrl, - headers: getRequestHeaders(optionalPrivateToken), - }) - .then(res => { - const body = JSON.parse(res.body) - if (res.statusCode >= 400) { - if (res.statusCode === 404) { - throw new Error('No contributors found on the GitHub repository') - } + return fetch(githubUrl, { + headers: getFetchHeaders(optionalPrivateToken), + }).then(res => { + if (res.status === 404 || res.status >= 500) { + throw new Error('No contributors found on the GitLab repository') + } + + return res.json().then(body => { + if (res.status >= 400 || !res.ok) { throw new Error(body.message) } const contributorsIds = body.map(contributor => contributor.login) - const nextLink = getNextLink(res.headers.link) + const nextLink = getNextLink(res.headers.get('link')) if (nextLink) { return getContributorsPage(nextLink, optionalPrivateToken).then( nextContributors => { @@ -76,9 +73,10 @@ function getContributorsPage(githubUrl, optionalPrivateToken) { return contributorsIds }) + }) } -const getUserInfo = function(username, hostname, optionalPrivateToken) { +const getUserInfo = function (username, hostname, optionalPrivateToken) { if (!username) { throw new Error( `No login when adding a contributor. Please specify a username.`, @@ -86,20 +84,16 @@ const getUserInfo = function(username, hostname, optionalPrivateToken) { } const root = getApiHost(hostname) - return request - .get({ - url: `${root}/users/${username}`, - headers: getRequestHeaders(optionalPrivateToken), - }) - .then(res => { - const body = JSON.parse(res.body) - + return fetch(`${root}/users/${username}`, { + headers: getFetchHeaders(optionalPrivateToken), + }).then(res => + res.json().then(body => { let profile = isValidHttpUrl(body.blog) ? body.blog : body.html_url // Check for authentication required if ( (!profile && body.message.includes('Must authenticate')) || - res.statusCode === 401 + res.status === 401 ) { throw new Error( `Missing authentication for GitHub API. Did you set PRIVATE_TOKEN?`, @@ -121,10 +115,11 @@ const getUserInfo = function(username, hostname, optionalPrivateToken) { avatar_url: body.avatar_url, profile, } - }) + }), + ) } -const getContributors = function(owner, name, hostname, optionalPrivateToken) { +const getContributors = function (owner, name, hostname, optionalPrivateToken) { const root = getApiHost(hostname) const contributorsUrl = `${root}/repos/${owner}/${name}/contributors?per_page=100` return getContributorsPage(contributorsUrl, optionalPrivateToken) diff --git a/src/repo/gitlab.js b/src/repo/gitlab.js index 2115f105..7269e479 100644 --- a/src/repo/gitlab.js +++ b/src/repo/gitlab.js @@ -1,5 +1,4 @@ -const pify = require('pify') -const request = pify(require('request')) +const fetch = require('node-fetch') const addPrivateToken = (url, privateToken = '') => { if (privateToken === '') return url @@ -9,25 +8,24 @@ const addPrivateToken = (url, privateToken = '') => { .replace('&', '?') } -const getUserInfo = function(username, hostname, privateToken) { +const getUserInfo = function (username, hostname, privateToken) { /* eslint-disable complexity */ if (!hostname) { hostname = 'https://gitlab.com' } - return request - .get({ - url: addPrivateToken( - `${hostname}/api/v4/users?username=${username}`, - privateToken, - ), + return fetch( + addPrivateToken( + `${hostname}/api/v4/users?username=${username}`, + privateToken, + ), + { headers: { - 'User-Agent': 'request', + 'User-Agent': 'node-fetch', }, - }) - .then(res => { - const body = JSON.parse(res.body) - + }, + ).then(res => + res.json().then(body => { // Gitlab returns an array of users. If it is empty, it means the username provided does not exist if (!body || body.length === 0) { throw new Error(`User ${username} not found`) @@ -48,27 +46,20 @@ const getUserInfo = function(username, hostname, privateToken) { ? user.web_url : `http://${user.web_url}`, } - }) + }), + ) } -const getContributors = function(owner, name, hostname, privateToken) { +const getContributors = function (owner, name, hostname, privateToken) { if (!hostname) { hostname = 'https://gitlab.com' } - return request - .get({ - url: addPrivateToken( - `${hostname}/api/v4/projects?search=${name}`, - privateToken, - ), - headers: { - 'User-Agent': 'request', - }, - }) - .then(res => { - const projects = JSON.parse(res.body) - + return fetch( + addPrivateToken(`${hostname}/api/v4/projects?search=${name}`, privateToken), + {headers: {'User-Agent': 'node-fetch'}}, + ).then(res => + res.json().then(projects => { // Gitlab returns an array of users. If it is empty, it means the username provided does not exist if (!projects || projects.length === 0) { throw new Error(`Project ${owner}/${name} not found`) @@ -86,27 +77,25 @@ const getContributors = function(owner, name, hostname, privateToken) { throw new Error(`Project ${owner}/${name} not found`) } - return request - .get({ - url: addPrivateToken( - `${hostname}/api/v4/projects/${project.id}/repository/contributors`, - privateToken, - ), - headers: { - 'User-Agent': 'request', - }, - }) - .then(newRes => { - const contributors = JSON.parse(newRes.body) - if (newRes.statusCode >= 400) { - if (newRes.statusCode === 404) { - throw new Error('No contributors found on the GitLab repository') - } + return fetch( + addPrivateToken( + `${hostname}/api/v4/projects/${project.id}/repository/contributors`, + privateToken, + ), + {headers: {'User-Agent': 'node-fetch'}}, + ).then(newRes => { + if (newRes.status === 404 || newRes.status >= 500) { + throw new Error('No contributors found on the GitLab repository') + } + return newRes.json().then(contributors => { + if (newRes.status >= 400 || !newRes.ok) { throw new Error(contributors.message) } return contributors.map(item => item.name) }) - }) + }) + }), + ) } module.exports = { From 374d07635f4bd9b53e5cf589c85059e658e4d7ec Mon Sep 17 00:00:00 2001 From: Jeroen Claassens Date: Sun, 16 Aug 2020 11:27:40 +0200 Subject: [PATCH 59/85] fix: fixed thrown error message (#280) This accidentally got in as I was copypasting code as part of #277 --- src/repo/github.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/repo/github.js b/src/repo/github.js index 990f7baf..ffd83570 100644 --- a/src/repo/github.js +++ b/src/repo/github.js @@ -53,7 +53,7 @@ function getContributorsPage(githubUrl, optionalPrivateToken) { headers: getFetchHeaders(optionalPrivateToken), }).then(res => { if (res.status === 404 || res.status >= 500) { - throw new Error('No contributors found on the GitLab repository') + throw new Error('No contributors found on the GitHub repository') } return res.json().then(body => { From 51b0837a0632940ce92d84cf83095a6f1d0fb487 Mon Sep 17 00:00:00 2001 From: "allcontributors[bot]" <46447321+allcontributors[bot]@users.noreply.github.com> Date: Tue, 18 Aug 2020 20:36:42 +0100 Subject: [PATCH 60/85] docs: add DavidAnson as a contributor (#279) * docs: update README.md [skip ci] * docs: update .all-contributorsrc [skip ci] Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> Co-authored-by: Maximilian Berkmann --- .all-contributorsrc | 9 +++++++++ README.md | 3 +++ 2 files changed, 12 insertions(+) diff --git a/.all-contributorsrc b/.all-contributorsrc index 9d65158e..6c85f06c 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -475,6 +475,15 @@ "code" ] }, + { + "login": "DavidAnson", + "name": "David Anson", + "avatar_url": "https://avatars1.githubusercontent.com/u/1828270?v=4", + "profile": "https://dlaa.me/", + "contributions": [ + "bug" + ] + }, { "login": "Favna", "name": "Jeroen Claassens", diff --git a/README.md b/README.md index 2dd08f56..9754234b 100644 --- a/README.md +++ b/README.md @@ -146,6 +146,9 @@ Thanks goes to these wonderful people
Jeroen Claassens

πŸ’» + +
David Anson

πŸ› + From 0c7559515698b6e24919d334cd1a3713afd3a200 Mon Sep 17 00:00:00 2001 From: "allcontributors[bot]" <46447321+allcontributors[bot]@users.noreply.github.com> Date: Sun, 23 Aug 2020 22:30:33 +0100 Subject: [PATCH 61/85] docs: add mloning as a contributor (#275) * docs: update README.md [skip ci] * docs: update .all-contributorsrc [skip ci] * fix: merge fix Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> Co-authored-by: Maximilian Berkmann --- .all-contributorsrc | 9 +++++++++ README.md | 3 +++ 2 files changed, 12 insertions(+) diff --git a/.all-contributorsrc b/.all-contributorsrc index 6c85f06c..7612acfe 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -475,6 +475,15 @@ "code" ] }, + { + "login": "mloning", + "name": "Markus LΓΆning", + "avatar_url": "https://avatars3.githubusercontent.com/u/21020482?v=4", + "profile": "https://www.linkedin.com/in/mloning/", + "contributions": [ + "code" + ] + }, { "login": "DavidAnson", "name": "David Anson", diff --git a/README.md b/README.md index 9754234b..02c2907f 100644 --- a/README.md +++ b/README.md @@ -149,6 +149,9 @@ Thanks goes to these wonderful people
David Anson

πŸ› + +
Markus LΓΆning

πŸ’» + From 1affe413088c45eb4f650a90f57ecae1c694ee50 Mon Sep 17 00:00:00 2001 From: Erek Speed Date: Thu, 17 Sep 2020 06:28:03 +0900 Subject: [PATCH 62/85] fix: make all-contributors output prettier compliant. (#283) Fixes #441 --- src/generate/__tests__/__snapshots__/index.js.snap | 2 ++ src/generate/__tests__/index.js | 1 + src/generate/index.js | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/generate/__tests__/__snapshots__/index.js.snap b/src/generate/__tests__/__snapshots__/index.js.snap index bc42607f..52a0eeb3 100644 --- a/src/generate/__tests__/__snapshots__/index.js.snap +++ b/src/generate/__tests__/__snapshots__/index.js.snap @@ -20,6 +20,7 @@ These people contributed to the project: + Thanks a lot everyone!" @@ -51,6 +52,7 @@ These people contributed to the project: + Thanks a lot everyone!" diff --git a/src/generate/__tests__/index.js b/src/generate/__tests__/index.js index a922b381..ece35d58 100644 --- a/src/generate/__tests__/index.js +++ b/src/generate/__tests__/index.js @@ -143,6 +143,7 @@ test('inject nothing if there are no contributors', () => { '', '', '', + '', '', '', 'Thanks a lot everyone!', diff --git a/src/generate/index.js b/src/generate/index.js index 549f8ea5..cacc21e6 100644 --- a/src/generate/index.js +++ b/src/generate/index.js @@ -31,7 +31,7 @@ function injectListBetweenTags(newContent) { newContent, '', '\n', - '\n', + '\n\n', previousContent.slice(startOfClosingTagIndex), ].join('') } From 5c506a526c26a2100d71c4a19d8e713f5066b336 Mon Sep 17 00:00:00 2001 From: Shai Reznik Date: Sun, 20 Sep 2020 13:52:21 +0300 Subject: [PATCH 63/85] fix(github): show the actual error message (#286) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: πŸ› show actual github error message * refactor(github): replaced "github" with "GitHub" Co-authored-by: Berkmann18 --- src/repo/__tests__/github.js | 77 ++++++++++++++++-------------------- src/repo/github.js | 8 ++-- 2 files changed, 38 insertions(+), 47 deletions(-) diff --git a/src/repo/__tests__/github.js b/src/repo/__tests__/github.js index 52a15927..7952d32a 100644 --- a/src/repo/__tests__/github.js +++ b/src/repo/__tests__/github.js @@ -58,9 +58,7 @@ async function rejects(promise) { } test('handle errors', async () => { - nock('https://api.github.com') - .get('/users/nodisplayname') - .replyWithError(404) + nock('https://api.github.com').get('/users/nodisplayname').replyWithError(404) await rejects(getUserInfo('nodisplayname')) }) @@ -73,15 +71,13 @@ test('Throw error when no username is provided', () => { test('Throw error when non existent username is provided', async () => { const username = 'thisusernamedoesntexist' - nock('https://api.github.com') - .get(`/users/${username}`) - .reply(404, { - message: 'Not Found', - documentation_url: - 'https://developer.github.com/v3/users/#get-a-single-user', - }) + nock('https://api.github.com').get(`/users/${username}`).reply(404, { + message: 'Not Found', + documentation_url: + 'https://developer.github.com/v3/users/#get-a-single-user', + }) await expect(getUserInfo(username)).rejects.toThrow( - `Login not found when adding a contributor for username - ${username}.`, + `The username ${username} doesn't exist on GitHub.`, ) }) @@ -100,27 +96,24 @@ test('Throw error when missing enterprise authentication', async () => { ) }) -test('handle github errors', async () => { - nock('https://api.github.com') - .get('/users/nodisplayname') - .reply(200, { - 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', - }) +test('handle API rate github errors', async () => { + const githubErrorMessage = + "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." + nock('https://api.github.com').get('/users/nodisplayname').reply(200, { + message: githubErrorMessage, + documentation_url: 'https://developer.github.com/v3/#rate-limiting', + }) - await rejects(getUserInfo('nodisplayname')) + await expect(getUserInfo('nodisplayname')).rejects.toThrow(githubErrorMessage) }) test('fill in the name when null is returned', async () => { - nock('https://api.github.com') - .get('/users/nodisplayname') - .reply(200, { - login: 'nodisplayname', - name: null, - avatar_url: 'https://avatars2.githubusercontent.com/u/3869412?v=3&s=400', - html_url: 'https://github.com/nodisplayname', - }) + nock('https://api.github.com').get('/users/nodisplayname').reply(200, { + login: 'nodisplayname', + name: null, + avatar_url: 'https://avatars2.githubusercontent.com/u/3869412?v=3&s=400', + html_url: 'https://github.com/nodisplayname', + }) const info = await getUserInfo('nodisplayname') expect(info.name).toBe('nodisplayname') @@ -161,28 +154,24 @@ test('attaches no token when not supplied', async () => { }) test('fill in the name when an empty string is returned', async () => { - nock('https://api.github.com') - .get('/users/nodisplayname') - .reply(200, { - login: 'nodisplayname', - name: '', - avatar_url: 'https://avatars2.githubusercontent.com/u/3869412?v=3&s=400', - html_url: 'https://github.com/nodisplayname', - }) + nock('https://api.github.com').get('/users/nodisplayname').reply(200, { + login: 'nodisplayname', + name: '', + avatar_url: 'https://avatars2.githubusercontent.com/u/3869412?v=3&s=400', + html_url: 'https://github.com/nodisplayname', + }) const info = await getUserInfo('nodisplayname') expect(info.name).toBe('nodisplayname') }) test('append http when no absolute link is provided', async () => { - nock('https://api.github.com') - .get('/users/nodisplayname') - .reply(200, { - login: 'nodisplayname', - name: '', - avatar_url: 'https://avatars2.githubusercontent.com/u/3869412?v=3&s=400', - html_url: 'www.github.com/nodisplayname', - }) + nock('https://api.github.com').get('/users/nodisplayname').reply(200, { + login: 'nodisplayname', + name: '', + avatar_url: 'https://avatars2.githubusercontent.com/u/3869412?v=3&s=400', + html_url: 'www.github.com/nodisplayname', + }) const info = await getUserInfo('nodisplayname') expect(info.profile).toBe('http://www.github.com/nodisplayname') diff --git a/src/repo/github.js b/src/repo/github.js index ffd83570..be671404 100644 --- a/src/repo/github.js +++ b/src/repo/github.js @@ -102,9 +102,11 @@ const getUserInfo = function (username, hostname, optionalPrivateToken) { // Github throwing specific errors as 200... if (!profile && body.message) { - throw new Error( - `Login not found when adding a contributor for username - ${username}.`, - ) + if (body.message.toLowerCase().includes('api rate limit exceeded')) { + throw new Error(body.message) + } else { + throw new Error(`The username ${username} doesn't exist on GitHub.`) + } } profile = parseHttpUrl(profile) From f1d576fda7c3567040d3797905a200a657083c78 Mon Sep 17 00:00:00 2001 From: "allcontributors[bot]" <46447321+allcontributors[bot]@users.noreply.github.com> Date: Sun, 20 Sep 2020 12:06:02 +0100 Subject: [PATCH 64/85] docs: add shairez as a contributor (#287) * docs: update README.md [skip ci] * docs: update .all-contributorsrc [skip ci] Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> Co-authored-by: Maximilian Berkmann --- .all-contributorsrc | 11 +++++ README.md | 108 +++++++++++++++++++++----------------------- 2 files changed, 63 insertions(+), 56 deletions(-) diff --git a/.all-contributorsrc b/.all-contributorsrc index 7612acfe..6013fcb8 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -501,6 +501,17 @@ "contributions": [ "code" ] + }, + { + "login": "shairez", + "name": "Shai Reznik", + "avatar_url": "https://avatars1.githubusercontent.com/u/1430726?v=4", + "profile": "http://www.hirez.io", + "contributions": [ + "bug", + "code", + "test" + ] } ], "skipCi": true diff --git a/README.md b/README.md index 02c2907f..d4cc0062 100644 --- a/README.md +++ b/README.md @@ -80,83 +80,79 @@ Thanks goes to these wonderful people - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - - - - - - - + + + + + + + + +

Jeroen Engels

πŸ’» πŸ“– ⚠️

Kent C. Dodds

πŸ“– πŸ’»

JoΓ£o GuimarΓ£es

πŸ’»

Ben Briggs

πŸ’»

Itai Steinherz

πŸ“– πŸ’»

Alex Jover

πŸ’» πŸ“–

Jeroen Engels

πŸ’» πŸ“– ⚠️

Kent C. Dodds

πŸ“– πŸ’»

JoΓ£o GuimarΓ£es

πŸ’»

Ben Briggs

πŸ’»

Itai Steinherz

πŸ“– πŸ’»

Alex Jover

πŸ’» πŸ“–

Jerod Santo

πŸ’»

Kevin Jalbert

πŸ’»

tunnckoCore

πŸ”§

Mehdi Achour

πŸ’»

Roy Revelt

πŸ›

Chris Vickery

πŸ’»

Jerod Santo

πŸ’»

Kevin Jalbert

πŸ’»

tunnckoCore

πŸ”§

Mehdi Achour

πŸ’»

Roy Revelt

πŸ›

Chris Vickery

πŸ’»

Bryce Reynolds

πŸ’»

James, please

πŸ€” πŸ’»

Spyros Ioakeimidis

πŸ’»

Fernando Costa

πŸ’»

snipe

πŸ“–

Gant Laborde

πŸ’»

Bryce Reynolds

πŸ’»

James, please

πŸ€” πŸ’»

Spyros Ioakeimidis

πŸ’»

Fernando Costa

πŸ’»

snipe

πŸ“–

Gant Laborde

πŸ’»

Md Zubair Ahmed

πŸ“– πŸ› πŸ’» ⚠️

Divjot Singh

πŸ“–

JoΓ£o Marques

πŸ’» πŸ“– πŸ€”

Andrew Lisowski

πŸ’» πŸ“– ⚠️

Xianming Zhong

πŸ“–

C.Y.Xu

πŸ’»

Md Zubair Ahmed

πŸ“– πŸ› πŸ’» ⚠️

Divjot Singh

πŸ“–

JoΓ£o Marques

πŸ’» πŸ“– πŸ€”

Andrew Lisowski

πŸ’» πŸ“– ⚠️

Xianming Zhong

πŸ“–

C.Y.Xu

πŸ’»

Dura

πŸ“–

Jake Bolam

πŸš‡ πŸ’» πŸ“– ⚠️ πŸ‘€ πŸ’¬

Maximilian Berkmann

πŸ’» ⚠️ πŸ“– πŸ”§ 🚧 πŸ‘€ πŸ’¬

tbenning

🎨

ehmicky

πŸ’»

James George

πŸ’»

Dura

πŸ“–

Jake Bolam

πŸš‡ πŸ’» πŸ“– ⚠️ πŸ‘€ πŸ’¬

Maximilian Berkmann

πŸ’» ⚠️ πŸ“– πŸ”§ 🚧 πŸ‘€ πŸ’¬

tbenning

🎨

ehmicky

πŸ’»

James George

πŸ’»

Nick Schonning

πŸ’»

Cezar Augusto

πŸ“–

Jeppe Reinhold

πŸ’»

Rachel M. Carmena

πŸ’»

simon3000

⚠️

SnOβ‚‚WMaN

πŸ’»

Nick Schonning

πŸ’»

Cezar Augusto

πŸ“–

Jeppe Reinhold

πŸ’»

Rachel M. Carmena

πŸ’»

simon3000

⚠️

SnOβ‚‚WMaN

πŸ’»

Fabrizio

πŸ› πŸ’»

kharaone

πŸ’»

Marcelo Alves

πŸ’» ⚠️

Anand Chowdhary

⚠️ πŸ› πŸ’»

Nicolas Goutay

πŸ’»

Tyler Krupicka

πŸ’» ⚠️

Fabrizio

πŸ› πŸ’»

kharaone

πŸ’»

Marcelo Alves

πŸ’» ⚠️

Anand Chowdhary

⚠️ πŸ› πŸ’»

Nicolas Goutay

πŸ’»

Tyler Krupicka

πŸ’» ⚠️

Stefano Moia

πŸ’»

IlaΓ― Deutel

πŸ“¦

Piotr StΔ™pniewski

πŸ› πŸ’» ⚠️

Gregor Martynus

πŸ‘€ πŸ’¬

Jeff Wen

πŸ‘€

PaweΕ‚ Kowalski

πŸ’»

Jeroen Claassens

πŸ’»

David Anson

πŸ›

Stefano Moia

πŸ’»

IlaΓ― Deutel

πŸ“¦

Piotr StΔ™pniewski

πŸ› πŸ’» ⚠️

Gregor Martynus

πŸ‘€ πŸ’¬

Jeff Wen

πŸ‘€

PaweΕ‚ Kowalski

πŸ’»

Markus LΓΆning

πŸ’»

David Anson

πŸ›

Jeroen Claassens

πŸ’»

Shai Reznik

πŸ› πŸ’» ⚠️
- + - This project follows the From d44b70a1f06852aa8767c743cf87b86806bef8ea Mon Sep 17 00:00:00 2001 From: Darek Kay Date: Sun, 4 Oct 2020 22:11:18 +0200 Subject: [PATCH 65/85] refactor: return a Promise instead of relying on callback parameter (#289) --- src/init/__tests__/add-contributors-list.js | 28 ++++++++++++--------- 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/src/init/__tests__/add-contributors-list.js b/src/init/__tests__/add-contributors-list.js index cb690ce5..bb532338 100644 --- a/src/init/__tests__/add-contributors-list.js +++ b/src/init/__tests__/add-contributors-list.js @@ -30,20 +30,24 @@ test('create contributors section if content is empty', () => { expect(result).toMatchSnapshot() }) -test('README exists', done => { - const file = 'README.md' - ensureFileExists(file) - .then(data => expect(data).toStrictEqual(file)) - .then(_ => done()) +test('README exists', () => { + return new Promise(done => { + const file = 'README.md' + ensureFileExists(file) + .then(data => expect(data).toStrictEqual(file)) + .then(_ => done()) + }) }) -test("LOREM doesn't exists", done => { - const file = 'LOREM.md' - ensureFileExists(file).then(data => { - expect(data).toStrictEqual(file) - return unlink(file, err => { - if (err) throw err - done() +test("LOREM doesn't exists", () => { + return new Promise(done => { + const file = 'LOREM.md' + ensureFileExists(file).then(data => { + expect(data).toStrictEqual(file) + return unlink(file, err => { + if (err) throw err + done() + }) }) }) }) From 0ec4d842ae0a0cb12e1562231c4bb65660e776fb Mon Sep 17 00:00:00 2001 From: "allcontributors[bot]" <46447321+allcontributors[bot]@users.noreply.github.com> Date: Sun, 4 Oct 2020 21:26:32 +0100 Subject: [PATCH 66/85] docs: add jdalrymple as a contributor (#264) * docs: update README.md [skip ci] * docs: update .all-contributorsrc [skip ci] Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> Co-authored-by: Maximilian Berkmann --- .all-contributorsrc | 9 +++++++++ README.md | 1 + 2 files changed, 10 insertions(+) diff --git a/.all-contributorsrc b/.all-contributorsrc index 6013fcb8..aa18fe87 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -436,6 +436,15 @@ "platform" ] }, + { + "login": "jdalrymple", + "name": "Justin Dalrymple", + "avatar_url": "https://avatars3.githubusercontent.com/u/3743662?v=4", + "profile": "https://github.com/jdalrymple", + "contributions": [ + "code" + ] + }, { "login": "k3nsei", "name": "Piotr StΔ™pniewski", diff --git a/README.md b/README.md index d4cc0062..ee0c2ca7 100644 --- a/README.md +++ b/README.md @@ -138,6 +138,7 @@ Thanks goes to these wonderful people
Stefano Moia

πŸ’»
IlaΓ― Deutel

πŸ“¦ +
Justin Dalrymple

πŸ’»
Piotr StΔ™pniewski

πŸ› πŸ’» ⚠️
Gregor Martynus

πŸ‘€ πŸ’¬
Jeff Wen

πŸ‘€ From 24004d56b5b389fe2ea66a399bbe88f29adddb36 Mon Sep 17 00:00:00 2001 From: "allcontributors[bot]" <46447321+allcontributors[bot]@users.noreply.github.com> Date: Sun, 4 Oct 2020 21:40:36 +0100 Subject: [PATCH 67/85] docs: add melink14 as a contributor (#285) * docs: update README.md [skip ci] * docs: update .all-contributorsrc [skip ci] * docs: contribution fix * docs(readme): rectified the README * docs(readme): rectified the README (again) Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> Co-authored-by: Berkmann18 --- .all-contributorsrc | 9 ++++ README.md | 110 ++++++++++++++++++++++---------------------- 2 files changed, 65 insertions(+), 54 deletions(-) diff --git a/.all-contributorsrc b/.all-contributorsrc index aa18fe87..da519c40 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -511,6 +511,15 @@ "code" ] }, + { + "login": "melink14", + "name": "Erek Speed", + "avatar_url": "https://avatars3.githubusercontent.com/u/1176550?v=4", + "profile": "https://erekspeed.com", + "contributions": [ + "code" + ] + }, { "login": "shairez", "name": "Shai Reznik", diff --git a/README.md b/README.md index ee0c2ca7..d5171161 100644 --- a/README.md +++ b/README.md @@ -80,80 +80,82 @@ Thanks goes to these wonderful people - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - - + + + + + + - - - - + + + + + +

Jeroen Engels

πŸ’» πŸ“– ⚠️

Kent C. Dodds

πŸ“– πŸ’»

JoΓ£o GuimarΓ£es

πŸ’»

Ben Briggs

πŸ’»

Itai Steinherz

πŸ“– πŸ’»

Alex Jover

πŸ’» πŸ“–

Jeroen Engels

πŸ’» πŸ“– ⚠️

Kent C. Dodds

πŸ“– πŸ’»

JoΓ£o GuimarΓ£es

πŸ’»

Ben Briggs

πŸ’»

Itai Steinherz

πŸ“– πŸ’»

Alex Jover

πŸ’» πŸ“–

Jerod Santo

πŸ’»

Kevin Jalbert

πŸ’»

tunnckoCore

πŸ”§

Mehdi Achour

πŸ’»

Roy Revelt

πŸ›

Chris Vickery

πŸ’»

Jerod Santo

πŸ’»

Kevin Jalbert

πŸ’»

tunnckoCore

πŸ”§

Mehdi Achour

πŸ’»

Roy Revelt

πŸ›

Chris Vickery

πŸ’»

Bryce Reynolds

πŸ’»

James, please

πŸ€” πŸ’»

Spyros Ioakeimidis

πŸ’»

Fernando Costa

πŸ’»

snipe

πŸ“–

Gant Laborde

πŸ’»

Bryce Reynolds

πŸ’»

James, please

πŸ€” πŸ’»

Spyros Ioakeimidis

πŸ’»

Fernando Costa

πŸ’»

snipe

πŸ“–

Gant Laborde

πŸ’»

Md Zubair Ahmed

πŸ“– πŸ› πŸ’» ⚠️

Divjot Singh

πŸ“–

JoΓ£o Marques

πŸ’» πŸ“– πŸ€”

Andrew Lisowski

πŸ’» πŸ“– ⚠️

Xianming Zhong

πŸ“–

C.Y.Xu

πŸ’»

Md Zubair Ahmed

πŸ“– πŸ› πŸ’» ⚠️

Divjot Singh

πŸ“–

JoΓ£o Marques

πŸ’» πŸ“– πŸ€”

Andrew Lisowski

πŸ’» πŸ“– ⚠️

Xianming Zhong

πŸ“–

C.Y.Xu

πŸ’»

Dura

πŸ“–

Jake Bolam

πŸš‡ πŸ’» πŸ“– ⚠️ πŸ‘€ πŸ’¬

Maximilian Berkmann

πŸ’» ⚠️ πŸ“– πŸ”§ 🚧 πŸ‘€ πŸ’¬

tbenning

🎨

ehmicky

πŸ’»

James George

πŸ’»

Dura

πŸ“–

Jake Bolam

πŸš‡ πŸ’» πŸ“– ⚠️ πŸ‘€ πŸ’¬

Maximilian Berkmann

πŸ’» ⚠️ πŸ“– πŸ”§ 🚧 πŸ‘€ πŸ’¬

tbenning

🎨

ehmicky

πŸ’»

James George

πŸ’»

Nick Schonning

πŸ’»

Cezar Augusto

πŸ“–

Jeppe Reinhold

πŸ’»

Rachel M. Carmena

πŸ’»

simon3000

⚠️

SnOβ‚‚WMaN

πŸ’»

Nick Schonning

πŸ’»

Cezar Augusto

πŸ“–

Jeppe Reinhold

πŸ’»

Rachel M. Carmena

πŸ’»

simon3000

⚠️

SnOβ‚‚WMaN

πŸ’»

Fabrizio

πŸ› πŸ’»

kharaone

πŸ’»

Marcelo Alves

πŸ’» ⚠️

Anand Chowdhary

⚠️ πŸ› πŸ’»

Nicolas Goutay

πŸ’»

Tyler Krupicka

πŸ’» ⚠️

Fabrizio

πŸ› πŸ’»

kharaone

πŸ’»

Marcelo Alves

πŸ’» ⚠️

Anand Chowdhary

⚠️ πŸ› πŸ’»

Nicolas Goutay

πŸ’»

Tyler Krupicka

πŸ’» ⚠️

Stefano Moia

πŸ’»

IlaΓ― Deutel

πŸ“¦

Justin Dalrymple

πŸ’»

Piotr StΔ™pniewski

πŸ› πŸ’» ⚠️

Gregor Martynus

πŸ‘€ πŸ’¬

Jeff Wen

πŸ‘€

PaweΕ‚ Kowalski

πŸ’»

Stefano Moia

πŸ’»

IlaΓ― Deutel

πŸ“¦

Justin Dalrymple

πŸ’»

Piotr StΔ™pniewski

πŸ› πŸ’» ⚠️

Gregor Martynus

πŸ‘€ πŸ’¬

Jeff Wen

πŸ‘€

Markus LΓΆning

πŸ’»

David Anson

πŸ›

Jeroen Claassens

πŸ’»

Shai Reznik

πŸ› πŸ’» ⚠️

PaweΕ‚ Kowalski

πŸ’»

Markus LΓΆning

πŸ’»

David Anson

πŸ›

Jeroen Claassens

πŸ’»

Erek Speed

πŸ’»

Shai Reznik

πŸ› πŸ’» ⚠️
- + + This project follows the From d517440203cca343e3d3c8fcae118bf06d0d3225 Mon Sep 17 00:00:00 2001 From: Darek Kay Date: Sun, 4 Oct 2020 22:44:02 +0200 Subject: [PATCH 68/85] feat: display a meaningful error when the config file is missing (#288) * feat: display a meaningful error when the config file is missing ## What When you try to add a user with `.all-contributorsrc` missing, you will get a cryptic error message (see also all-contributors/all-contributors#378): ``` $ all-contributors add darekkay maintenance Cannot read property 'then' of null ``` This PR displays a meaningful error message in this case. ## Why So users know what's causing the problem. ## How Before a contribution is being added, the script checks whether the config file exists. If it doesn't, an error message is being displayed: ``` $ all-contributors add darekkay maintenance Configuration file not found: C:\projects\test\.all-contributorsrc ``` * docs: add darekkay as a contributor * refactor: fixed typos * docs(readme): table rectification Co-authored-by: Maximilian Berkmann --- .all-contributorsrc | 9 +++++++++ README.md | 3 ++- src/cli.js | 1 + src/generate/__tests__/format-contributor.js | 2 +- src/repo/__tests__/github.js | 4 ++-- 5 files changed, 15 insertions(+), 4 deletions(-) diff --git a/.all-contributorsrc b/.all-contributorsrc index da519c40..b501ffe0 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -530,6 +530,15 @@ "code", "test" ] + }, + { + "login": "darekkay", + "name": "Darek Kay", + "avatar_url": "https://avatars0.githubusercontent.com/u/3101914?v=4", + "profile": "https://darekkay.com/", + "contributions": [ + "code" + ] } ], "skipCi": true diff --git a/README.md b/README.md index d5171161..344349d5 100644 --- a/README.md +++ b/README.md @@ -148,8 +148,9 @@ Thanks goes to these wonderful people
Markus LΓΆning

πŸ’»
David Anson

πŸ›
Jeroen Claassens

πŸ’» -
Erek Speed

πŸ’»
Shai Reznik

πŸ› πŸ’» ⚠️ +
Darek Kay

πŸ’» +
Erek Speed

πŸ’» diff --git a/src/cli.js b/src/cli.js index 91212b1d..4d356819 100755 --- a/src/cli.js +++ b/src/cli.js @@ -66,6 +66,7 @@ function startGeneration(argv) { } function addContribution(argv) { + util.configFile.readConfig(argv.config) // ensure the config file exists const username = argv._[1] === undefined ? undefined : String(argv._[1]) const contributions = argv._[2] // Add or update contributor in the config file diff --git a/src/generate/__tests__/format-contributor.js b/src/generate/__tests__/format-contributor.js index 013318a7..bb3451ec 100644 --- a/src/generate/__tests__/format-contributor.js +++ b/src/generate/__tests__/format-contributor.js @@ -68,7 +68,7 @@ test('format contributor with pipes in their name', () => { expect(formatContributor(options, contributor)).toBe(expected) }) -test('format contributor with no github account', () => { +test('format contributor with no GitHub account', () => { const contributor = contributors.nologin const {options} = fixtures() diff --git a/src/repo/__tests__/github.js b/src/repo/__tests__/github.js index 7952d32a..ad9de9c7 100644 --- a/src/repo/__tests__/github.js +++ b/src/repo/__tests__/github.js @@ -96,7 +96,7 @@ test('Throw error when missing enterprise authentication', async () => { ) }) -test('handle API rate github errors', async () => { +test('handle API rate GitHub errors', async () => { const githubErrorMessage = "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." nock('https://api.github.com').get('/users/nodisplayname').reply(200, { @@ -177,7 +177,7 @@ test('append http when no absolute link is provided', async () => { expect(info.profile).toBe('http://www.github.com/nodisplayname') }) -test('retrieve user from a different github registry', async () => { +test('retrieve user from a different GitHub registry', async () => { nock('http://github.myhost.com:3000/api/v3') .get('/users/nodisplayname') .reply(200, { From d59d279ab4a0aa0310fb2e74c200f4d2978a473f Mon Sep 17 00:00:00 2001 From: "allcontributors[bot]" <46447321+allcontributors[bot]@users.noreply.github.com> Date: Sun, 4 Oct 2020 21:51:37 +0100 Subject: [PATCH 69/85] docs: add darekkay as a contributor (#290) * docs: update README.md [skip ci] * docs: update .all-contributorsrc [skip ci] * docs(readme): table update Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> Co-authored-by: Maximilian Berkmann --- .all-contributorsrc | 5 +++-- README.md | 6 ++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.all-contributorsrc b/.all-contributorsrc index b501ffe0..578b2ebc 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -535,9 +535,10 @@ "login": "darekkay", "name": "Darek Kay", "avatar_url": "https://avatars0.githubusercontent.com/u/3101914?v=4", - "profile": "https://darekkay.com/", + "profile": "https://darekkay.com", "contributions": [ - "code" + "code", + "test" ] } ], diff --git a/README.md b/README.md index 344349d5..939e6386 100644 --- a/README.md +++ b/README.md @@ -148,9 +148,11 @@ Thanks goes to these wonderful people
Markus LΓΆning

πŸ’»
David Anson

πŸ›
Jeroen Claassens

πŸ’» -
Shai Reznik

πŸ› πŸ’» ⚠️ -
Darek Kay

πŸ’»
Erek Speed

πŸ’» +
Shai Reznik

πŸ› πŸ’» ⚠️ + + +
Darek Kay

πŸ’» ⚠️ From f9f2866bbb47b7673194ecd8ffbcaecfbebc0bcc Mon Sep 17 00:00:00 2001 From: LaChapeliere Date: Fri, 9 Oct 2020 20:34:34 +0200 Subject: [PATCH 70/85] feat(contribution-types): add research contribution type (#291) * feat(contribution-types.js): add research contribution type Add a research contribution type with microscope emoji, for people doing literature review, code prototyping or any other research-related activity. #446 * fix(contribution-types.js): fix name and position of added type Fix name of added type (was "question" due to copy pasting) and position (alphabetical order) #446 * Transform emoji code into emoji Co-authored-by: Maximilian Berkmann Co-authored-by: Maximilian Berkmann --- src/util/contribution-types.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/util/contribution-types.js b/src/util/contribution-types.js index 7cefd72c..98073263 100644 --- a/src/util/contribution-types.js +++ b/src/util/contribution-types.js @@ -94,6 +94,10 @@ const defaultTypes = function(repoType) { symbol: 'πŸ’¬', description: 'Answering Questions', }, + research: { + symbol: 'πŸ”¬', + description: 'Research', + }, review: { symbol: 'πŸ‘€', description: 'Reviewed Pull Requests', From f1dc01d714b75e468465565659ae3e03ddbc9237 Mon Sep 17 00:00:00 2001 From: "allcontributors[bot]" <46447321+allcontributors[bot]@users.noreply.github.com> Date: Mon, 14 Dec 2020 22:01:29 +0000 Subject: [PATCH 71/85] docs: add LaChapeliere as a contributor (#292) * docs: update README.md [skip ci] * docs: update .all-contributorsrc [skip ci] Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> --- .all-contributorsrc | 9 ++++ README.md | 114 ++++++++++++++++++++++---------------------- 2 files changed, 66 insertions(+), 57 deletions(-) diff --git a/.all-contributorsrc b/.all-contributorsrc index 578b2ebc..54be8e19 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -540,6 +540,15 @@ "code", "test" ] + }, + { + "login": "LaChapeliere", + "name": "LaChapeliere", + "avatar_url": "https://avatars2.githubusercontent.com/u/7062546?v=4", + "profile": "https://github.com/LaChapeliere", + "contributions": [ + "code" + ] } ], "skipCi": true diff --git a/README.md b/README.md index 939e6386..48cb0bd5 100644 --- a/README.md +++ b/README.md @@ -80,85 +80,85 @@ Thanks goes to these wonderful people - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - + +

Jeroen Engels

πŸ’» πŸ“– ⚠️

Kent C. Dodds

πŸ“– πŸ’»

JoΓ£o GuimarΓ£es

πŸ’»

Ben Briggs

πŸ’»

Itai Steinherz

πŸ“– πŸ’»

Alex Jover

πŸ’» πŸ“–

Jeroen Engels

πŸ’» πŸ“– ⚠️

Kent C. Dodds

πŸ“– πŸ’»

JoΓ£o GuimarΓ£es

πŸ’»

Ben Briggs

πŸ’»

Itai Steinherz

πŸ“– πŸ’»

Alex Jover

πŸ’» πŸ“–

Jerod Santo

πŸ’»

Kevin Jalbert

πŸ’»

tunnckoCore

πŸ”§

Mehdi Achour

πŸ’»

Roy Revelt

πŸ›

Chris Vickery

πŸ’»

Jerod Santo

πŸ’»

Kevin Jalbert

πŸ’»

tunnckoCore

πŸ”§

Mehdi Achour

πŸ’»

Roy Revelt

πŸ›

Chris Vickery

πŸ’»

Bryce Reynolds

πŸ’»

James, please

πŸ€” πŸ’»

Spyros Ioakeimidis

πŸ’»

Fernando Costa

πŸ’»

snipe

πŸ“–

Gant Laborde

πŸ’»

Bryce Reynolds

πŸ’»

James, please

πŸ€” πŸ’»

Spyros Ioakeimidis

πŸ’»

Fernando Costa

πŸ’»

snipe

πŸ“–

Gant Laborde

πŸ’»

Md Zubair Ahmed

πŸ“– πŸ› πŸ’» ⚠️

Divjot Singh

πŸ“–

JoΓ£o Marques

πŸ’» πŸ“– πŸ€”

Andrew Lisowski

πŸ’» πŸ“– ⚠️

Xianming Zhong

πŸ“–

C.Y.Xu

πŸ’»

Md Zubair Ahmed

πŸ“– πŸ› πŸ’» ⚠️

Divjot Singh

πŸ“–

JoΓ£o Marques

πŸ’» πŸ“– πŸ€”

Andrew Lisowski

πŸ’» πŸ“– ⚠️

Xianming Zhong

πŸ“–

C.Y.Xu

πŸ’»

Dura

πŸ“–

Jake Bolam

πŸš‡ πŸ’» πŸ“– ⚠️ πŸ‘€ πŸ’¬

Maximilian Berkmann

πŸ’» ⚠️ πŸ“– πŸ”§ 🚧 πŸ‘€ πŸ’¬

tbenning

🎨

ehmicky

πŸ’»

James George

πŸ’»

Dura

πŸ“–

Jake Bolam

πŸš‡ πŸ’» πŸ“– ⚠️ πŸ‘€ πŸ’¬

Maximilian Berkmann

πŸ’» ⚠️ πŸ“– πŸ”§ 🚧 πŸ‘€ πŸ’¬

tbenning

🎨

ehmicky

πŸ’»

James George

πŸ’»

Nick Schonning

πŸ’»

Cezar Augusto

πŸ“–

Jeppe Reinhold

πŸ’»

Rachel M. Carmena

πŸ’»

simon3000

⚠️

SnOβ‚‚WMaN

πŸ’»

Nick Schonning

πŸ’»

Cezar Augusto

πŸ“–

Jeppe Reinhold

πŸ’»

Rachel M. Carmena

πŸ’»

simon3000

⚠️

SnOβ‚‚WMaN

πŸ’»

Fabrizio

πŸ› πŸ’»

kharaone

πŸ’»

Marcelo Alves

πŸ’» ⚠️

Anand Chowdhary

⚠️ πŸ› πŸ’»

Nicolas Goutay

πŸ’»

Tyler Krupicka

πŸ’» ⚠️

Fabrizio

πŸ› πŸ’»

kharaone

πŸ’»

Marcelo Alves

πŸ’» ⚠️

Anand Chowdhary

⚠️ πŸ› πŸ’»

Nicolas Goutay

πŸ’»

Tyler Krupicka

πŸ’» ⚠️

Stefano Moia

πŸ’»

IlaΓ― Deutel

πŸ“¦

Justin Dalrymple

πŸ’»

Piotr StΔ™pniewski

πŸ› πŸ’» ⚠️

Gregor Martynus

πŸ‘€ πŸ’¬

Jeff Wen

πŸ‘€

Stefano Moia

πŸ’»

IlaΓ― Deutel

πŸ“¦

Justin Dalrymple

πŸ’»

Piotr StΔ™pniewski

πŸ› πŸ’» ⚠️

Gregor Martynus

πŸ‘€ πŸ’¬

Jeff Wen

πŸ‘€

PaweΕ‚ Kowalski

πŸ’»

Markus LΓΆning

πŸ’»

David Anson

πŸ›

Jeroen Claassens

πŸ’»

Erek Speed

πŸ’»

Shai Reznik

πŸ› πŸ’» ⚠️

PaweΕ‚ Kowalski

πŸ’»

Markus LΓΆning

πŸ’»

David Anson

πŸ›

Jeroen Claassens

πŸ’»

Erek Speed

πŸ’»

Shai Reznik

πŸ› πŸ’» ⚠️

Darek Kay

πŸ’» ⚠️

Darek Kay

πŸ’» ⚠️

LaChapeliere

πŸ’»
- + - This project follows the From a8227af31c22577f434a42fcf8d81dbc01eaf822 Mon Sep 17 00:00:00 2001 From: SirWindfield Date: Sat, 13 Feb 2021 17:25:11 +0100 Subject: [PATCH 72/85] feat: add namespaced token (#296) * feat: add namespaced token This commit adds the possibility to specify the private token via the ALL_CONTRIBUTORS_PRIVATE_TOKEN environment variable. If the environment variable is not set it will fall back to the previous behavior and check for PRIVATE_TOKEN instead. Closes #294 * style: remove irregular whitespace * refactor: remove unneeded parenthesis --- src/repo/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/repo/index.js b/src/repo/index.js index 808d70b4..3ff5492a 100644 --- a/src/repo/index.js +++ b/src/repo/index.js @@ -1,7 +1,7 @@ const githubAPI = require('./github') const gitlabAPI = require('./gitlab') -const privateToken = (process.env && process.env.PRIVATE_TOKEN) || '' +const privateToken = (process.env && (process.env.ALL_CONTRIBUTORS_PRIVATE_TOKEN || process.env.PRIVATE_TOKEN)) || '' const SUPPORTED_REPO_TYPES = { github: { value: 'github', From e9c1f55beb2c18391a5d5f0c9e8243dc3f89ebe3 Mon Sep 17 00:00:00 2001 From: "allcontributors[bot]" <46447321+allcontributors[bot]@users.noreply.github.com> Date: Sun, 14 Feb 2021 08:21:21 +0000 Subject: [PATCH 73/85] docs: add SirWindfield as a contributor (#297) * docs: update README.md [skip ci] * docs: update .all-contributorsrc [skip ci] Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> --- .all-contributorsrc | 9 ++++ README.md | 116 ++++++++++++++++++++++---------------------- 2 files changed, 68 insertions(+), 57 deletions(-) diff --git a/.all-contributorsrc b/.all-contributorsrc index 54be8e19..56a9bdd7 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -549,6 +549,15 @@ "contributions": [ "code" ] + }, + { + "login": "SirWindfield", + "name": "SirWindfield", + "avatar_url": "https://github.com/avatars/u/5113257?v=4", + "profile": "https://github.com/SirWindfield", + "contributions": [ + "code" + ] } ], "skipCi": true diff --git a/README.md b/README.md index 48cb0bd5..4e3eaa53 100644 --- a/README.md +++ b/README.md @@ -80,85 +80,87 @@ Thanks goes to these wonderful people - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - + + +

Jeroen Engels

πŸ’» πŸ“– ⚠️

Kent C. Dodds

πŸ“– πŸ’»

JoΓ£o GuimarΓ£es

πŸ’»

Ben Briggs

πŸ’»

Itai Steinherz

πŸ“– πŸ’»

Alex Jover

πŸ’» πŸ“–

Jeroen Engels

πŸ’» πŸ“– ⚠️

Kent C. Dodds

πŸ“– πŸ’»

JoΓ£o GuimarΓ£es

πŸ’»

Ben Briggs

πŸ’»

Itai Steinherz

πŸ“– πŸ’»

Alex Jover

πŸ’» πŸ“–

Jerod Santo

πŸ’»

Kevin Jalbert

πŸ’»

tunnckoCore

πŸ”§

Mehdi Achour

πŸ’»

Roy Revelt

πŸ›

Chris Vickery

πŸ’»

Jerod Santo

πŸ’»

Kevin Jalbert

πŸ’»

tunnckoCore

πŸ”§

Mehdi Achour

πŸ’»

Roy Revelt

πŸ›

Chris Vickery

πŸ’»

Bryce Reynolds

πŸ’»

James, please

πŸ€” πŸ’»

Spyros Ioakeimidis

πŸ’»

Fernando Costa

πŸ’»

snipe

πŸ“–

Gant Laborde

πŸ’»

Bryce Reynolds

πŸ’»

James, please

πŸ€” πŸ’»

Spyros Ioakeimidis

πŸ’»

Fernando Costa

πŸ’»

snipe

πŸ“–

Gant Laborde

πŸ’»

Md Zubair Ahmed

πŸ“– πŸ› πŸ’» ⚠️

Divjot Singh

πŸ“–

JoΓ£o Marques

πŸ’» πŸ“– πŸ€”

Andrew Lisowski

πŸ’» πŸ“– ⚠️

Xianming Zhong

πŸ“–

C.Y.Xu

πŸ’»

Md Zubair Ahmed

πŸ“– πŸ› πŸ’» ⚠️

Divjot Singh

πŸ“–

JoΓ£o Marques

πŸ’» πŸ“– πŸ€”

Andrew Lisowski

πŸ’» πŸ“– ⚠️

Xianming Zhong

πŸ“–

C.Y.Xu

πŸ’»

Dura

πŸ“–

Jake Bolam

πŸš‡ πŸ’» πŸ“– ⚠️ πŸ‘€ πŸ’¬

Maximilian Berkmann

πŸ’» ⚠️ πŸ“– πŸ”§ 🚧 πŸ‘€ πŸ’¬

tbenning

🎨

ehmicky

πŸ’»

James George

πŸ’»

Dura

πŸ“–

Jake Bolam

πŸš‡ πŸ’» πŸ“– ⚠️ πŸ‘€ πŸ’¬

Maximilian Berkmann

πŸ’» ⚠️ πŸ“– πŸ”§ 🚧 πŸ‘€ πŸ’¬

tbenning

🎨

ehmicky

πŸ’»

James George

πŸ’»

Nick Schonning

πŸ’»

Cezar Augusto

πŸ“–

Jeppe Reinhold

πŸ’»

Rachel M. Carmena

πŸ’»

simon3000

⚠️

SnOβ‚‚WMaN

πŸ’»

Nick Schonning

πŸ’»

Cezar Augusto

πŸ“–

Jeppe Reinhold

πŸ’»

Rachel M. Carmena

πŸ’»

simon3000

⚠️

SnOβ‚‚WMaN

πŸ’»

Fabrizio

πŸ› πŸ’»

kharaone

πŸ’»

Marcelo Alves

πŸ’» ⚠️

Anand Chowdhary

⚠️ πŸ› πŸ’»

Nicolas Goutay

πŸ’»

Tyler Krupicka

πŸ’» ⚠️

Fabrizio

πŸ› πŸ’»

kharaone

πŸ’»

Marcelo Alves

πŸ’» ⚠️

Anand Chowdhary

⚠️ πŸ› πŸ’»

Nicolas Goutay

πŸ’»

Tyler Krupicka

πŸ’» ⚠️

Stefano Moia

πŸ’»

IlaΓ― Deutel

πŸ“¦

Justin Dalrymple

πŸ’»

Piotr StΔ™pniewski

πŸ› πŸ’» ⚠️

Gregor Martynus

πŸ‘€ πŸ’¬

Jeff Wen

πŸ‘€

Stefano Moia

πŸ’»

IlaΓ― Deutel

πŸ“¦

Justin Dalrymple

πŸ’»

Piotr StΔ™pniewski

πŸ› πŸ’» ⚠️

Gregor Martynus

πŸ‘€ πŸ’¬

Jeff Wen

πŸ‘€

PaweΕ‚ Kowalski

πŸ’»

Markus LΓΆning

πŸ’»

David Anson

πŸ›

Jeroen Claassens

πŸ’»

Erek Speed

πŸ’»

Shai Reznik

πŸ› πŸ’» ⚠️

PaweΕ‚ Kowalski

πŸ’»

Markus LΓΆning

πŸ’»

David Anson

πŸ›

Jeroen Claassens

πŸ’»

Erek Speed

πŸ’»

Shai Reznik

πŸ› πŸ’» ⚠️

Darek Kay

πŸ’» ⚠️

LaChapeliere

πŸ’»

Darek Kay

πŸ’» ⚠️

LaChapeliere

πŸ’»

SirWindfield

πŸ’»
- + + This project follows the From 4be9bffe31f26302268471e38ec04d0330e05d20 Mon Sep 17 00:00:00 2001 From: G r e y Date: Fri, 14 May 2021 14:06:40 -0500 Subject: [PATCH 74/85] chore(deps): CVE-2021-23337 in inquirer->lodash (#303) Resolves: #302 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1f2364dd..68be55a9 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "async": "^3.0.1", "chalk": "^4.0.0", "didyoumean": "^1.2.1", - "inquirer": "^7.0.4", + "inquirer": "^7.3.3", "json-fixer": "^1.5.1", "lodash": "^4.11.2", "node-fetch": "^2.6.0", From f1a336d9f3e4a63c6ce69752ffa61d67e308fa4d Mon Sep 17 00:00:00 2001 From: "allcontributors[bot]" <46447321+allcontributors[bot]@users.noreply.github.com> Date: Fri, 14 May 2021 20:13:11 +0100 Subject: [PATCH 75/85] docs: add vapurrmaid as a contributor (#304) * docs: update README.md [skip ci] * docs: update .all-contributorsrc [skip ci] * docs(config): update .all-contributorsrc * docs(readme): update README.md Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> Co-authored-by: Maximilian Berkmann --- .all-contributorsrc | 9 +++++++++ README.md | 1 + 2 files changed, 10 insertions(+) diff --git a/.all-contributorsrc b/.all-contributorsrc index 56a9bdd7..4856b698 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -558,6 +558,15 @@ "contributions": [ "code" ] + }, + { + "login": "vapurrmaid", + "name": "G r e y", + "avatar_url": "https://github.com/avatars/u/11184711?v=4", + "profile": "https://vapurrmaid.ca", + "contributions": [ + "security" + ] } ], "skipCi": true diff --git a/README.md b/README.md index 4e3eaa53..ff03185e 100644 --- a/README.md +++ b/README.md @@ -155,6 +155,7 @@ Thanks goes to these wonderful people
Darek Kay

πŸ’» ⚠️
LaChapeliere

πŸ’»
SirWindfield

πŸ’» +
G r e y

πŸ›‘οΈ From d3b8f8889db7fe44e678e1da2395b1ede41807ad Mon Sep 17 00:00:00 2001 From: Lucas Cimon <925560+Lucas-C@users.noreply.github.com> Date: Mon, 29 Nov 2021 23:51:02 +0100 Subject: [PATCH 76/85] fix: scriptName + improving usage messages (#305) * Improving usage messages + fixing scriptName * Fixes post-review --- other/MAINTAINING.md | 8 ++++---- src/cli.js | 14 +++++--------- 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/other/MAINTAINING.md b/other/MAINTAINING.md index 5232261b..a31d2adf 100644 --- a/other/MAINTAINING.md +++ b/other/MAINTAINING.md @@ -41,8 +41,8 @@ as you want/need to. Nobody can ask any more of you than that. As a maintainer, you're fine to make your branches on the main repo or on your own fork. Either way is fine. -When we receive a pull request, a travis build is kicked off automatically (see the `.travis.yml` -for what runs in the travis build). We avoid merging anything that breaks the travis build. +When we receive a pull request, a Circle CI build is kicked off automatically (see the `.circleci/` +directory for what runs in the CI pipeline). We avoid merging anything that breaks the CI pipeline. Please review PRs and focus on the code rather than the individual. You never know when this is someone's first ever PR and we want their experience to be as positive as possible, so be @@ -56,8 +56,8 @@ about that. ## Release -Our releases are automatic. They happen whenever code lands into `master`. A travis build gets -kicked off and if it's successful, a tool called +Our releases are automatic. They happen whenever code lands into `master`. A Circle CI build +build gets kicked off and if it's successful, a tool called [`semantic-release`](https://github.com/semantic-release/semantic-release) is used to automatically publish a new release to npm as well as a changelog to GitHub. It is only able to determine the version and whether a release is necessary by the git commit messages. With this diff --git a/src/cli.js b/src/cli.js index 4d356819..7be588ec 100755 --- a/src/cli.js +++ b/src/cli.js @@ -16,22 +16,18 @@ const cwd = process.cwd() const defaultRCFile = path.join(cwd, '.all-contributorsrc') const yargv = yargs + .scriptName('all-contributors') .help('help') .alias('h', 'help') .alias('v', 'version') .version() .recommendCommands() - .command('generate', 'Generate the list of contributors') - .usage('Usage: $0 generate') - .command('add', 'add a new contributor') - .usage('Usage: $0 add ') - .command('init', 'Prepare the project to be used with this tool') - .usage('Usage: $0 init') + .command('generate', `Generate the list of contributors\n\nUSAGE: all-contributors generate`) + .command('add', `Add a new contributor\n\nUSAGE: all-contributors add `) + .command('init', `Prepare the project to be used with this tool\n\nUSAGE: all-contributors init`) .command( 'check', - 'Compares contributors from the repository with the ones credited in .all-contributorsrc', - ) - .usage('Usage: $0 check') + `Compare contributors from the repository with the ones credited in .all-contributorsrc'\n\nUSAGE: all-contributors check`) .boolean('commit') .default('files', ['README.md']) .default('contributorsPerLine', 7) From 5dbb7213b08a7badc6a357b2af719c2c5daef9a3 Mon Sep 17 00:00:00 2001 From: "allcontributors[bot]" <46447321+allcontributors[bot]@users.noreply.github.com> Date: Tue, 30 Nov 2021 09:43:56 -0800 Subject: [PATCH 77/85] docs: add Lucas-C as a contributor for doc (#306) * docs: update README.md [skip ci] * docs: update .all-contributorsrc [skip ci] Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> --- .all-contributorsrc | 11 ++++- README.md | 109 ++++++++++++++++++++++---------------------- 2 files changed, 65 insertions(+), 55 deletions(-) diff --git a/.all-contributorsrc b/.all-contributorsrc index 4856b698..afe1e39a 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -1,6 +1,6 @@ { "projectOwner": "all-contributors", - "projectName": "all-contributors-cli", + "projectName": "cli", "imageSize": 100, "repoType": "github", "commit": false, @@ -567,6 +567,15 @@ "contributions": [ "security" ] + }, + { + "login": "Lucas-C", + "name": "Lucas Cimon", + "avatar_url": "https://github.com/avatars/u/925560?v=4", + "profile": "https://chezsoi.org/lucas/blog/", + "contributions": [ + "doc" + ] } ], "skipCi": true diff --git a/README.md b/README.md index ff03185e..1eae84d9 100644 --- a/README.md +++ b/README.md @@ -80,82 +80,83 @@ Thanks goes to these wonderful people - - - - - - + + + + + + - - + + - - - + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - + + + - - + + - - - - - - + + + + + + - - - - - - + + + + + + - + - - - - + + + + - - - - - - + + + + + + - - - + + + +

Jeroen Engels

πŸ’» πŸ“– ⚠️

Kent C. Dodds

πŸ“– πŸ’»

JoΓ£o GuimarΓ£es

πŸ’»

Ben Briggs

πŸ’»

Itai Steinherz

πŸ“– πŸ’»

Alex Jover

πŸ’» πŸ“–

Jeroen Engels

πŸ’» πŸ“– ⚠️

Kent C. Dodds

πŸ“– πŸ’»

JoΓ£o GuimarΓ£es

πŸ’»

Ben Briggs

πŸ’»

Itai Steinherz

πŸ“– πŸ’»

Alex Jover

πŸ’» πŸ“–

Jerod Santo

πŸ’»

Kevin Jalbert

πŸ’»

Jerod Santo

πŸ’»

Kevin Jalbert

πŸ’»

tunnckoCore

πŸ”§

Mehdi Achour

πŸ’»

Roy Revelt

πŸ›

Chris Vickery

πŸ’»

Mehdi Achour

πŸ’»

Roy Revelt

πŸ›

Chris Vickery

πŸ’»

Bryce Reynolds

πŸ’»

James, please

πŸ€” πŸ’»

Spyros Ioakeimidis

πŸ’»

Fernando Costa

πŸ’»

snipe

πŸ“–

Gant Laborde

πŸ’»

Bryce Reynolds

πŸ’»

James, please

πŸ€” πŸ’»

Spyros Ioakeimidis

πŸ’»

Fernando Costa

πŸ’»

snipe

πŸ“–

Gant Laborde

πŸ’»

Md Zubair Ahmed

πŸ“– πŸ› πŸ’» ⚠️

Divjot Singh

πŸ“–

JoΓ£o Marques

πŸ’» πŸ“– πŸ€”

Andrew Lisowski

πŸ’» πŸ“– ⚠️

Xianming Zhong

πŸ“–

C.Y.Xu

πŸ’»

Md Zubair Ahmed

πŸ“– πŸ› πŸ’» ⚠️

Divjot Singh

πŸ“–

JoΓ£o Marques

πŸ’» πŸ“– πŸ€”

Andrew Lisowski

πŸ’» πŸ“– ⚠️

Xianming Zhong

πŸ“–

C.Y.Xu

πŸ’»

Dura

πŸ“–

Jake Bolam

πŸš‡ πŸ’» πŸ“– ⚠️ πŸ‘€ πŸ’¬

Maximilian Berkmann

πŸ’» ⚠️ πŸ“– πŸ”§ 🚧 πŸ‘€ πŸ’¬

Dura

πŸ“–

Jake Bolam

πŸš‡ πŸ’» πŸ“– ⚠️ πŸ‘€ πŸ’¬

Maximilian Berkmann

πŸ’» ⚠️ πŸ“– πŸ”§ 🚧 πŸ‘€ πŸ’¬

tbenning

🎨

ehmicky

πŸ’»

James George

πŸ’»

ehmicky

πŸ’»

James George

πŸ’»

Nick Schonning

πŸ’»

Cezar Augusto

πŸ“–

Jeppe Reinhold

πŸ’»

Rachel M. Carmena

πŸ’»

simon3000

⚠️

SnOβ‚‚WMaN

πŸ’»

Nick Schonning

πŸ’»

Cezar Augusto

πŸ“–

Jeppe Reinhold

πŸ’»

Rachel M. Carmena

πŸ’»

simon3000

⚠️

SnOβ‚‚WMaN

πŸ’»

Fabrizio

πŸ› πŸ’»

kharaone

πŸ’»

Marcelo Alves

πŸ’» ⚠️

Anand Chowdhary

⚠️ πŸ› πŸ’»

Nicolas Goutay

πŸ’»

Tyler Krupicka

πŸ’» ⚠️

Fabrizio

πŸ› πŸ’»

kharaone

πŸ’»

Marcelo Alves

πŸ’» ⚠️

Anand Chowdhary

⚠️ πŸ› πŸ’»

Nicolas Goutay

πŸ’»

Tyler Krupicka

πŸ’» ⚠️

Stefano Moia

πŸ’»

Stefano Moia

πŸ’»

IlaΓ― Deutel

πŸ“¦

Justin Dalrymple

πŸ’»

Piotr StΔ™pniewski

πŸ› πŸ’» ⚠️

Gregor Martynus

πŸ‘€ πŸ’¬

Jeff Wen

πŸ‘€

Justin Dalrymple

πŸ’»

Piotr StΔ™pniewski

πŸ› πŸ’» ⚠️

Gregor Martynus

πŸ‘€ πŸ’¬

Jeff Wen

πŸ‘€

PaweΕ‚ Kowalski

πŸ’»

Markus LΓΆning

πŸ’»

David Anson

πŸ›

Jeroen Claassens

πŸ’»

Erek Speed

πŸ’»

Shai Reznik

πŸ› πŸ’» ⚠️

PaweΕ‚ Kowalski

πŸ’»

Markus LΓΆning

πŸ’»

David Anson

πŸ›

Jeroen Claassens

πŸ’»

Erek Speed

πŸ’»

Shai Reznik

πŸ› πŸ’» ⚠️

Darek Kay

πŸ’» ⚠️

LaChapeliere

πŸ’»

SirWindfield

πŸ’»

Darek Kay

πŸ’» ⚠️

LaChapeliere

πŸ’»

SirWindfield

πŸ’»

G r e y

πŸ›‘οΈ

Lucas Cimon

πŸ“–
From deb6be93f0a27248582041ca35fccedf9a2a11a2 Mon Sep 17 00:00:00 2001 From: Pierre Huyghe Date: Wed, 7 Sep 2022 10:19:41 +0200 Subject: [PATCH 78/85] refactor: add tbody to contributors table (#307) * refactor: add tbody to contributors table * chore(node): bump version to lts * fix(html): add correct indentation * test(url): fix bind error message Co-authored-by: Pierre Huyghe --- .circleci/config.yml | 2 +- .nvmrc | 2 +- .../__tests__/__snapshots__/index.js.snap | 36 ++++++++------- src/generate/index.js | 10 ++-- src/util/__tests__/url.js | 46 +++++++++++-------- 5 files changed, 54 insertions(+), 42 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 009ab1e2..ceb88c74 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,7 +2,7 @@ version: 2.1 docker_defaults: &docker_defaults docker: - - image: circleci/node:12.14.0 + - image: cimg/node:16.17.0 commands: prep_env: diff --git a/.nvmrc b/.nvmrc index 65d83ce5..2a4e4ab8 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -12.14.0 +16.17.0 diff --git a/src/generate/__tests__/__snapshots__/index.js.snap b/src/generate/__tests__/__snapshots__/index.js.snap index 52a0eeb3..cb402f95 100644 --- a/src/generate/__tests__/__snapshots__/index.js.snap +++ b/src/generate/__tests__/__snapshots__/index.js.snap @@ -11,11 +11,13 @@ These people contributed to the project: - - - - - + + + + + + +
Kent C. Dodds is awesome!Divjot Singh is awesome!Jeroen Engels is awesome!
Kent C. Dodds is awesome!Divjot Singh is awesome!Jeroen Engels is awesome!
@@ -37,17 +39,19 @@ These people contributed to the project: - - - - - - - - - - - + + + + + + + + + + + + +
Kent C. Dodds is awesome!Kent C. Dodds is awesome!Kent C. Dodds is awesome!Kent C. Dodds is awesome!Kent C. Dodds is awesome!
Kent C. Dodds is awesome!Kent C. Dodds is awesome!
Kent C. Dodds is awesome!Kent C. Dodds is awesome!Kent C. Dodds is awesome!Kent C. Dodds is awesome!Kent C. Dodds is awesome!
Kent C. Dodds is awesome!Kent C. Dodds is awesome!
diff --git a/src/generate/index.js b/src/generate/index.js index cacc21e6..b9b7e213 100644 --- a/src/generate/index.js +++ b/src/generate/index.js @@ -3,7 +3,7 @@ const formatBadge = require('./format-badge') const formatContributor = require('./format-contributor') function injectListBetweenTags(newContent) { - return function(previousContent) { + return function (previousContent) { const tagToLookFor = `' const startOfOpeningTagIndex = previousContent.indexOf( @@ -39,7 +39,7 @@ function injectListBetweenTags(newContent) { function formatLine(contributors) { return `${contributors.join( - '\n ', + '\n ', )}` } @@ -55,15 +55,15 @@ function generateContributorsList(options, contributors) { }), _.chunk(options.contributorsPerLine), _.map(formatLine), - _.join('\n \n \n '), + _.join('\n \n \n '), newContent => { - return `\n\n \n ${newContent}\n \n
\n\n` + return `\n\n \n \n ${newContent}\n \n \n
\n\n` }, )(contributors) } function replaceBadge(newContent) { - return function(previousContent) { + return function (previousContent) { const tagToLookFor = `' const startOfOpeningTagIndex = previousContent.indexOf( diff --git a/src/util/__tests__/url.js b/src/util/__tests__/url.js index 50ff6d4d..359775e9 100644 --- a/src/util/__tests__/url.js +++ b/src/util/__tests__/url.js @@ -1,49 +1,57 @@ -import url from '../url'; +import url from '../url' test(`Result of protocol validation should be true`, () => { - expect(url.isHttpProtocol('http:')).toBe(true) - expect(url.isHttpProtocol('https:')).toBe(true) + expect(url.isHttpProtocol('http:')).toBe(true) + expect(url.isHttpProtocol('https:')).toBe(true) }) test(`Result of protocol validation should be false`, () => { - expect(url.isHttpProtocol('ftp:')).toBe(false) + expect(url.isHttpProtocol('ftp:')).toBe(false) }) test(`Result of url validation should be true`, () => { - expect(url.isValidHttpUrl('https://github.com/gitapi/users/octocat')).toBe(true) + expect(url.isValidHttpUrl('https://github.com/gitapi/users/octocat')).toBe(true) }) test(`Result of url validation should be false when url uses wrong protocol`, () => { - expect(url.isValidHttpUrl('git://git@github.com:all-contributors/all-contributors-cli.git')).toBe(false) + expect( + url.isValidHttpUrl( + 'git://git@github.com:all-contributors/all-contributors-cli.git', + ), + ).toBe(false) }) test(`Result of url validation should be false when input isn't url`, () => { - expect(url.isValidHttpUrl('github-octocat')).toBe(false) + expect(url.isValidHttpUrl('github-octocat')).toBe(false) }) test(`Result of parsed url should be equal`, () => { - const input = 'https://github.com/gitapi/users/octocat' - const expected = 'https://github.com/gitapi/users/octocat' - expect(url.parseHttpUrl(input)).toBe(expected) + const input = 'https://github.com/gitapi/users/octocat' + const expected = 'https://github.com/gitapi/users/octocat' + expect(url.parseHttpUrl(input)).toBe(expected) }) test(`Result of parsed url without protocol should be equal`, () => { - const input = 'example.com' - const expected = 'http://example.com/' - expect(url.parseHttpUrl(input)).toBe(expected) + const input = 'example.com' + const expected = 'http://example.com/' + expect(url.parseHttpUrl(input)).toBe(expected) }) test(`Throw an error when parsed input isn't a string`, () => { - const input = 123 - expect(url.parseHttpUrl.bind(null, input)).toThrowError('input must be a string') + const input = 123 + expect(url.parseHttpUrl.bind(null, input)).toThrowError( + 'input must be a string', + ) }) test(`Throw an error when parsed url has wrong protocol`, () => { - const input = 'ftp://domain.xyz' - expect(url.parseHttpUrl.bind(null, input)).toThrowError('Provided URL has an invalid protocol') + const input = 'ftp://domain.xyz' + expect(url.parseHttpUrl.bind(null, input)).toThrowError( + 'Provided URL has an invalid protocol', + ) }) test(`Throw an error when parsed input isn't a URL`, () => { - const input = 'some string' - expect(url.parseHttpUrl.bind(null, input)).toThrowError('Invalid URL: http://some string') + const input = 'some string' + expect(url.parseHttpUrl.bind(null, input)).toThrowError('Invalid URL') }) From 0b9706252ca88fd075c5cfb9030c44de96046d1c Mon Sep 17 00:00:00 2001 From: Maximilian Berkmann Date: Wed, 7 Sep 2022 09:24:11 +0100 Subject: [PATCH 79/85] chore(deps): bump dependencies and devDeps (#298) Bump dependencies that seems to have been missed by greenkeeper Co-authored-by: Angel Aviel Domaoan <13580338+tenshiAMD@users.noreply.github.com> --- package.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 68be55a9..5ff44f18 100644 --- a/package.json +++ b/package.json @@ -43,20 +43,20 @@ "homepage": "https://github.com/all-contributors/all-contributors-cli#readme", "dependencies": { "@babel/runtime": "^7.7.6", - "async": "^3.0.1", + "async": "^3.1.0", "chalk": "^4.0.0", "didyoumean": "^1.2.1", "inquirer": "^7.3.3", - "json-fixer": "^1.5.1", + "json-fixer": "^1.6.8", "lodash": "^4.11.2", "node-fetch": "^2.6.0", "pify": "^5.0.0", "yargs": "^15.0.1" }, "devDependencies": { - "codecov": "^3.1.0", - "cz-conventional-changelog": "^3.0.0", - "git-cz": "^4.1.0", + "codecov": "^3.8.1", + "cz-conventional-changelog": "^3.3.0", + "git-cz": "^4.7.6", "kcd-scripts": "^6.2.0", "nock": "^12.0.0", "semantic-release": "^17.0.8" From e1fd794ef7e161c94576fdec5946c536de15723d Mon Sep 17 00:00:00 2001 From: Jake Bolam Date: Wed, 7 Sep 2022 04:27:30 -0400 Subject: [PATCH 80/85] fix: set default value as `7` for `contributorsPerLine` (#139) fix: set default value as `7` for `contributorsPerLine` Co-authored-by: Maximilian Berkmann Co-authored-by: Angel Aviel Domaoan <13580338+tenshiAMD@users.noreply.github.com> --- src/generate/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/generate/index.js b/src/generate/index.js index b9b7e213..05fb9dd9 100644 --- a/src/generate/index.js +++ b/src/generate/index.js @@ -44,6 +44,7 @@ function formatLine(contributors) { } function generateContributorsList(options, contributors) { + const contributorsPerLine = options.contributorsPerLine || 7 return _.flow( _.sortBy(contributor => { if (options.contributorsSortAlphabetically) { @@ -53,7 +54,7 @@ function generateContributorsList(options, contributors) { _.map(function formatEveryContributor(contributor) { return formatContributor(options, contributor) }), - _.chunk(options.contributorsPerLine), + _.chunk(contributorsPerLine), _.map(formatLine), _.join('\n \n \n '), newContent => { From 5df6b47f8a200b40f9278c221c7aa537d3d3c832 Mon Sep 17 00:00:00 2001 From: Dominic Saadi Date: Wed, 7 Sep 2022 17:31:03 +0900 Subject: [PATCH 81/85] fix: trim `nextLink` before slicing (#309) fix: trim `nextLink` before slicing --- src/repo/github.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/repo/github.js b/src/repo/github.js index be671404..15261e63 100644 --- a/src/repo/github.js +++ b/src/repo/github.js @@ -45,7 +45,7 @@ function getNextLink(link) { return null } - return nextLink.split(';')[0].slice(1, -1) + return nextLink.split(';')[0].trim().slice(1, -1) } function getContributorsPage(githubUrl, optionalPrivateToken) { From 531b7e1c4a3bd04c2abdb5201f6289198dc051d4 Mon Sep 17 00:00:00 2001 From: Chad Dougherty Date: Thu, 8 Sep 2022 12:00:44 -0400 Subject: [PATCH 82/85] fix: incorrect usage of `tbody` (#311) --- src/generate/__tests__/__snapshots__/index.js.snap | 4 ++-- src/generate/index.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/generate/__tests__/__snapshots__/index.js.snap b/src/generate/__tests__/__snapshots__/index.js.snap index cb402f95..15d4d74b 100644 --- a/src/generate/__tests__/__snapshots__/index.js.snap +++ b/src/generate/__tests__/__snapshots__/index.js.snap @@ -17,7 +17,7 @@ These people contributed to the project: Divjot Singh is awesome! Jeroen Engels is awesome! - + @@ -51,7 +51,7 @@ These people contributed to the project: Kent C. Dodds is awesome! Kent C. Dodds is awesome! - + diff --git a/src/generate/index.js b/src/generate/index.js index 05fb9dd9..99828295 100644 --- a/src/generate/index.js +++ b/src/generate/index.js @@ -58,7 +58,7 @@ function generateContributorsList(options, contributors) { _.map(formatLine), _.join('\n \n \n '), newContent => { - return `\n\n \n \n ${newContent}\n \n \n
\n\n` + return `\n\n \n \n ${newContent}\n \n \n
\n\n` }, )(contributors) } From 220eac29d42fd6c9d9d35279525f36f02de4fc82 Mon Sep 17 00:00:00 2001 From: "allcontributors[bot]" <46447321+allcontributors[bot]@users.noreply.github.com> Date: Fri, 9 Sep 2022 07:24:13 +0800 Subject: [PATCH 83/85] docs: add JoshuaKGoldberg as a contributor for bug (#314) Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> --- .all-contributorsrc | 9 +++ README.md | 161 ++++++++++++++++++++++---------------------- 2 files changed, 91 insertions(+), 79 deletions(-) diff --git a/.all-contributorsrc b/.all-contributorsrc index afe1e39a..c590a91c 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -576,6 +576,15 @@ "contributions": [ "doc" ] + }, + { + "login": "JoshuaKGoldberg", + "name": "Josh Goldberg", + "avatar_url": "https://github.com/avatars/u/3335181?v=4", + "profile": "http://www.joshuakgoldberg.com", + "contributions": [ + "bug" + ] } ], "skipCi": true diff --git a/README.md b/README.md index 1eae84d9..8bfc66f7 100644 --- a/README.md +++ b/README.md @@ -79,85 +79,88 @@ Thanks goes to these wonderful people - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Jeroen Engels

πŸ’» πŸ“– ⚠️

Kent C. Dodds

πŸ“– πŸ’»

JoΓ£o GuimarΓ£es

πŸ’»

Ben Briggs

πŸ’»

Itai Steinherz

πŸ“– πŸ’»

Alex Jover

πŸ’» πŸ“–

Jerod Santo

πŸ’»

Kevin Jalbert

πŸ’»

tunnckoCore

πŸ”§

Mehdi Achour

πŸ’»

Roy Revelt

πŸ›

Chris Vickery

πŸ’»

Bryce Reynolds

πŸ’»

James, please

πŸ€” πŸ’»

Spyros Ioakeimidis

πŸ’»

Fernando Costa

πŸ’»

snipe

πŸ“–

Gant Laborde

πŸ’»

Md Zubair Ahmed

πŸ“– πŸ› πŸ’» ⚠️

Divjot Singh

πŸ“–

JoΓ£o Marques

πŸ’» πŸ“– πŸ€”

Andrew Lisowski

πŸ’» πŸ“– ⚠️

Xianming Zhong

πŸ“–

C.Y.Xu

πŸ’»

Dura

πŸ“–

Jake Bolam

πŸš‡ πŸ’» πŸ“– ⚠️ πŸ‘€ πŸ’¬

Maximilian Berkmann

πŸ’» ⚠️ πŸ“– πŸ”§ 🚧 πŸ‘€ πŸ’¬

tbenning

🎨

ehmicky

πŸ’»

James George

πŸ’»

Nick Schonning

πŸ’»

Cezar Augusto

πŸ“–

Jeppe Reinhold

πŸ’»

Rachel M. Carmena

πŸ’»

simon3000

⚠️

SnOβ‚‚WMaN

πŸ’»

Fabrizio

πŸ› πŸ’»

kharaone

πŸ’»

Marcelo Alves

πŸ’» ⚠️

Anand Chowdhary

⚠️ πŸ› πŸ’»

Nicolas Goutay

πŸ’»

Tyler Krupicka

πŸ’» ⚠️

Stefano Moia

πŸ’»

IlaΓ― Deutel

πŸ“¦

Justin Dalrymple

πŸ’»

Piotr StΔ™pniewski

πŸ› πŸ’» ⚠️

Gregor Martynus

πŸ‘€ πŸ’¬

Jeff Wen

πŸ‘€

PaweΕ‚ Kowalski

πŸ’»

Markus LΓΆning

πŸ’»

David Anson

πŸ›

Jeroen Claassens

πŸ’»

Erek Speed

πŸ’»

Shai Reznik

πŸ› πŸ’» ⚠️

Darek Kay

πŸ’» ⚠️

LaChapeliere

πŸ’»

SirWindfield

πŸ’»

G r e y

πŸ›‘οΈ

Lucas Cimon

πŸ“–

Jeroen Engels

πŸ’» πŸ“– ⚠️

Kent C. Dodds

πŸ“– πŸ’»

JoΓ£o GuimarΓ£es

πŸ’»

Ben Briggs

πŸ’»

Itai Steinherz

πŸ“– πŸ’»

Alex Jover

πŸ’» πŸ“–

Jerod Santo

πŸ’»

Kevin Jalbert

πŸ’»

tunnckoCore

πŸ”§

Mehdi Achour

πŸ’»

Roy Revelt

πŸ›

Chris Vickery

πŸ’»

Bryce Reynolds

πŸ’»

James, please

πŸ€” πŸ’»

Spyros Ioakeimidis

πŸ’»

Fernando Costa

πŸ’»

snipe

πŸ“–

Gant Laborde

πŸ’»

Md Zubair Ahmed

πŸ“– πŸ› πŸ’» ⚠️

Divjot Singh

πŸ“–

JoΓ£o Marques

πŸ’» πŸ“– πŸ€”

Andrew Lisowski

πŸ’» πŸ“– ⚠️

Xianming Zhong

πŸ“–

C.Y.Xu

πŸ’»

Dura

πŸ“–

Jake Bolam

πŸš‡ πŸ’» πŸ“– ⚠️ πŸ‘€ πŸ’¬

Maximilian Berkmann

πŸ’» ⚠️ πŸ“– πŸ”§ 🚧 πŸ‘€ πŸ’¬

tbenning

🎨

ehmicky

πŸ’»

James George

πŸ’»

Nick Schonning

πŸ’»

Cezar Augusto

πŸ“–

Jeppe Reinhold

πŸ’»

Rachel M. Carmena

πŸ’»

simon3000

⚠️

SnOβ‚‚WMaN

πŸ’»

Fabrizio

πŸ› πŸ’»

kharaone

πŸ’»

Marcelo Alves

πŸ’» ⚠️

Anand Chowdhary

⚠️ πŸ› πŸ’»

Nicolas Goutay

πŸ’»

Tyler Krupicka

πŸ’» ⚠️

Stefano Moia

πŸ’»

IlaΓ― Deutel

πŸ“¦

Justin Dalrymple

πŸ’»

Piotr StΔ™pniewski

πŸ› πŸ’» ⚠️

Gregor Martynus

πŸ‘€ πŸ’¬

Jeff Wen

πŸ‘€

PaweΕ‚ Kowalski

πŸ’»

Markus LΓΆning

πŸ’»

David Anson

πŸ›

Jeroen Claassens

πŸ’»

Erek Speed

πŸ’»

Shai Reznik

πŸ› πŸ’» ⚠️

Darek Kay

πŸ’» ⚠️

LaChapeliere

πŸ’»

SirWindfield

πŸ’»

G r e y

πŸ›‘οΈ

Lucas Cimon

πŸ“–

Josh Goldberg

πŸ›
From c8fdc639e60b9323a2d9b09bfd72324fb9bba6de Mon Sep 17 00:00:00 2001 From: Angel Aviel Domaoan <13580338+tenshiAMD@users.noreply.github.com> Date: Sat, 10 Sep 2022 01:53:05 +0800 Subject: [PATCH 84/85] chore: fix status badges (#315) --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8bfc66f7..a2974f5f 100644 --- a/README.md +++ b/README.md @@ -43,8 +43,8 @@ -[![Build Status](https://img.shields.io/circleci/project/all-contributors/all-contributors-cli/master.svg)](https://circleci.com/gh/all-contributors/workflows/all-contributors-cli/tree/master) -[![Code Coverage](https://img.shields.io/codecov/c/github/all-contributors/all-contributors-cli.svg)](https://codecov.io/github/all-contributors/all-contributors-cli) +[![Build Status](https://dl.circleci.com/status-badge/img/gh/all-contributors/cli/tree/master.svg?style=svg)](https://dl.circleci.com/status-badge/redirect/gh/all-contributors/cli/tree/master) +[![Code Coverage](https://codecov.io/gh/all-contributors/cli/branch/master/graph/badge.svg?token=jHIrCqevli)](https://codecov.io/gh/all-contributors/cli) [![Version](https://img.shields.io/npm/v/all-contributors-cli.svg)](https://www.npmjs.com/package/all-contributors-cli) [![Downloads](https://img.shields.io/npm/dm/all-contributors-cli.svg)](http://www.npmtrends.com/all-contributors-cli) [![AUR Version](https://img.shields.io/aur/version/all-contributors-cli.svg)](https://aur.archlinux.org/packages/all-contributors-cli) From 097f741c79920f9e020da29ee7f42c4f7f55e182 Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Sat, 10 Sep 2022 11:17:27 +1000 Subject: [PATCH 85/85] refactor: log full error stack on error (#316) --- src/cli.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cli.js b/src/cli.js index 7be588ec..1c52e969 100755 --- a/src/cli.js +++ b/src/cli.js @@ -125,7 +125,7 @@ function checkContributors(argv) { function onError(error) { if (error) { - console.error(error.message) + console.error(error.stack || error.message || error) process.exit(1) } process.exit(0)