all-contributors-cli
Advanced tools
Comparing version 4.5.0 to 4.5.1
@@ -16,2 +16,8 @@ 'use strict'; | ||
var profile = body.blog || body.html_url; | ||
// Github throwing specific errors as 200... | ||
if (!profile && body.message) { | ||
throw new Error(body.message); | ||
} | ||
profile = profile.startsWith('http') ? profile : 'http://' + profile; | ||
@@ -18,0 +24,0 @@ |
@@ -13,2 +13,13 @@ import test from 'ava'; | ||
test('should handle github errors', t => { | ||
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' | ||
}); | ||
return t.throws(getUserInfo('nodisplayname')); | ||
}); | ||
test('should fill in the name when null is returned', t => { | ||
@@ -15,0 +26,0 @@ nock('https://api.github.com') |
{ | ||
"name": "all-contributors-cli", | ||
"version": "4.5.0", | ||
"version": "4.5.1", | ||
"description": "Tool to easily add recognition for new contributors", | ||
@@ -12,2 +12,3 @@ "bin": { | ||
"scripts": { | ||
"all-contributors": "./cli.js", | ||
"test": "xo && nyc ava", | ||
@@ -14,0 +15,0 @@ "semantic-release": "semantic-release pre && npm publish && semantic-release post" |
# all-contributors-cli | ||
[![version](https://img.shields.io/npm/v/all-contributors-cli.svg)](http://npm.im/all-contributors-cli) | ||
[![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-9-orange.svg?style=flat-square)](#contributors) | ||
@@ -99,3 +99,3 @@ This is a tool to help automate adding contributor acknowledgements according to the [all-contributors](https://github.com/kentcdodds/all-contributors) specification. | ||
| :---: | :---: | :---: | :---: | :---: | :---: | :---: | | ||
| [<img src="https://avatars1.githubusercontent.com/u/574871?v=3" width="100px;"/><br /><sub>Kevin Jalbert</sub>](https://github.com/kevinjalbert)<br />[💻](https://github.com/jfmengels/all-contributors-cli/commits?author=kevinjalbert "Code") | | ||
| [<img src="https://avatars1.githubusercontent.com/u/574871?v=3" width="100px;"/><br /><sub>Kevin Jalbert</sub>](https://github.com/kevinjalbert)<br />[💻](https://github.com/jfmengels/all-contributors-cli/commits?author=kevinjalbert "Code") | [<img src="https://avatars3.githubusercontent.com/u/5038030?v=4" width="100px;"/><br /><sub>tunnckoCore</sub>](https://i.am.charlike.online)<br />[🔧](#tool-charlike "Tools") | | ||
<!-- ALL-CONTRIBUTORS-LIST:END --> | ||
@@ -102,0 +102,0 @@ |
52221
1334