all-contributors-cli
Advanced tools
Comparing version 4.0.0 to 4.0.1
@@ -15,2 +15,5 @@ 'use strict'; | ||
var body = JSON.parse(res.body); | ||
var profile = body.blog || body.html_url; | ||
profile = profile.startsWith('http') ? profile : 'http://' + profile; | ||
return { | ||
@@ -20,5 +23,5 @@ login: body.login, | ||
avatar_url: body.avatar_url, | ||
profile: body.blog || body.html_url | ||
profile | ||
}; | ||
}); | ||
}; |
@@ -44,1 +44,17 @@ import test from 'ava'; | ||
}); | ||
test('should append http when no absolute link is provided', t => { | ||
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' | ||
}); | ||
return getUserInfo('nodisplayname') | ||
.then(info => { | ||
t.is(info.profile, 'http://www.github.com/nodisplayname'); | ||
}); | ||
}); |
{ | ||
"name": "all-contributors-cli", | ||
"version": "4.0.0", | ||
"version": "4.0.1", | ||
"description": "Tool to easily add recognition for new contributors", | ||
@@ -5,0 +5,0 @@ "bin": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
48477
1295