diff --git a/.all-contributorsrc b/.all-contributorsrc index e86e599..3424be8 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -255,6 +255,17 @@ "doc", "test" ] + }, + { + "login": "Berkmann18", + "name": "Maximilian Berkmann", + "avatar_url": "https://avatars0.githubusercontent.com/u/8260834?v=4", + "profile": "http://maxcubing.wordpress.com", + "contributions": [ + "code", + "test", + "doc" + ] } ] } diff --git a/README.md b/README.md index b9ba005..ba67a41 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ [![MIT License][license-badge]][license] [![Chat on Slack][chat-badge]][chat] -[![All Contributors](https://img.shields.io/badge/all_contributors-26-orange.svg?style=flat-square)](#contributors) +[![All Contributors](https://img.shields.io/badge/all_contributors-27-orange.svg?style=flat-square)](#contributors) [![PRs Welcome][prs-badge]][prs] [![Code of Conduct][coc-badge]][coc] [![Watch on GitHub][github-watch-badge]][github-watch] [![Star on GitHub][github-star-badge]][github-star] @@ -229,7 +229,8 @@ Thanks goes to these wonderful people | [
Jerod Santo](https://jerodsanto.net)
[💻](https://github.com/all-contributors/all-contributors-cli/commits?author=jerodsanto "Code") | [
Kevin Jalbert](https://github.com/kevinjalbert)
[💻](https://github.com/all-contributors/all-contributors-cli/commits?author=kevinjalbert "Code") | [
tunnckoCore](https://i.am.charlike.online)
[🔧](#tool-charlike "Tools") | [
Mehdi Achour](https://machour.idk.tn/)
[💻](https://github.com/all-contributors/all-contributors-cli/commits?author=machour "Code") | [
Roy Revelt](https://codsen.com)
[🐛](https://github.com/all-contributors/all-contributors-cli/issues?q=author%3Arevelt "Bug reports") | [
Chris Vickery](https://github.com/chrisinajar)
[💻](https://github.com/all-contributors/all-contributors-cli/commits?author=chrisinajar "Code") | | [
Bryce Reynolds](https://github.com/brycereynolds)
[💻](https://github.com/all-contributors/all-contributors-cli/commits?author=brycereynolds "Code") | [
James, please](http://www.jmeas.com)
[🤔](#ideas-jmeas "Ideas, Planning, & Feedback") [💻](https://github.com/all-contributors/all-contributors-cli/commits?author=jmeas "Code") | [
Spyros Ioakeimidis](http://www.spyros.io)
[💻](https://github.com/all-contributors/all-contributors-cli/commits?author=spirosikmd "Code") | [
Fernando Costa](https://github.com/fadc80)
[💻](https://github.com/all-contributors/all-contributors-cli/commits?author=fadc80 "Code") | [
snipe](https://snipe.net)
[📖](https://github.com/all-contributors/all-contributors-cli/commits?author=snipe "Documentation") | [
Gant Laborde](http://gantlaborde.com/)
[💻](https://github.com/all-contributors/all-contributors-cli/commits?author=GantMan "Code") | | [
Md Zubair Ahmed](https://in.linkedin.com/in/mzubairahmed)
[📖](https://github.com/all-contributors/all-contributors-cli/commits?author=M-ZubairAhmed "Documentation") [🐛](https://github.com/all-contributors/all-contributors-cli/issues?q=author%3AM-ZubairAhmed "Bug reports") [💻](https://github.com/all-contributors/all-contributors-cli/commits?author=M-ZubairAhmed "Code") [⚠️](https://github.com/all-contributors/all-contributors-cli/commits?author=M-ZubairAhmed "Tests") | [
Divjot Singh](http://bogas04.github.io)
[📖](https://github.com/all-contributors/all-contributors-cli/commits?author=bogas04 "Documentation") | [
João Marques](https://github.com/tigermarques)
[💻](https://github.com/all-contributors/all-contributors-cli/commits?author=tigermarques "Code") [📖](https://github.com/all-contributors/all-contributors-cli/commits?author=tigermarques "Documentation") [🤔](#ideas-tigermarques "Ideas, Planning, & Feedback") | [
Andrew Lisowski](http://hipstersmoothie.com)
[💻](https://github.com/all-contributors/all-contributors-cli/commits?author=hipstersmoothie "Code") [📖](https://github.com/all-contributors/all-contributors-cli/commits?author=hipstersmoothie "Documentation") [⚠️](https://github.com/all-contributors/all-contributors-cli/commits?author=hipstersmoothie "Tests") | [
Xianming Zhong](https://github.com/chinesedfan)
[📖](https://github.com/all-contributors/all-contributors-cli/commits?author=chinesedfan "Documentation") | [
C.Y.Xu](https://github.com/xuchaoying)
[💻](https://github.com/all-contributors/all-contributors-cli/commits?author=xuchaoying "Code") | -| [
Dura](https://github.com/chris-dura)
[📖](https://github.com/all-contributors/all-contributors-cli/commits?author=chris-dura "Documentation") | [
Jake Bolam](https://jakebolam.com)
[🚇](#infra-jakebolam "Infrastructure (Hosting, Build-Tools, etc)") [💻](https://github.com/all-contributors/all-contributors-cli/commits?author=jakebolam "Code") [📖](https://github.com/all-contributors/all-contributors-cli/commits?author=jakebolam "Documentation") [⚠️](https://github.com/all-contributors/all-contributors-cli/commits?author=jakebolam "Tests") | +| [
Dura](https://github.com/chris-dura)
[📖](https://github.com/all-contributors/all-contributors-cli/commits?author=chris-dura "Documentation") | [
Jake Bolam](https://jakebolam.com)
[🚇](#infra-jakebolam "Infrastructure (Hosting, Build-Tools, etc)") [💻](https://github.com/all-contributors/all-contributors-cli/commits?author=jakebolam "Code") [📖](https://github.com/all-contributors/all-contributors-cli/commits?author=jakebolam "Documentation") [⚠️](https://github.com/all-contributors/all-contributors-cli/commits?author=jakebolam "Tests") | [
Maximilian Berkmann](http://maxcubing.wordpress.com)
[💻](https://github.com/all-contributors/all-contributors-cli/commits?author=Berkmann18 "Code") [⚠️](https://github.com/all-contributors/all-contributors-cli/commits?author=Berkmann18 "Tests") [📖](https://github.com/all-contributors/all-contributors-cli/commits?author=Berkmann18 "Documentation") | + This project follows the diff --git a/src/generate/__tests__/format-contributor.js b/src/generate/__tests__/format-contributor.js index de707ce..652dc8a 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](http://kentcdodds.com)
[👀](#review-kentcdodds "Reviewed Pull Requests")' + '[Kent C. Dodds
Kent C. Dodds](http://kentcdodds.com)
[👀](#review-kentcdodds "Reviewed Pull Requests")' 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](http://kentcdodds.com)
[📖](https://github.com/all-contributors/all-contributors-cli/commits?author=kentcdodds "Documentation") [👀](#review-kentcdodds "Reviewed Pull Requests") [💬](#question-kentcdodds "Answering Questions")' + '[Kent C. Dodds
Kent C. Dodds](http://kentcdodds.com)
[📖](https://github.com/all-contributors/all-contributors-cli/commits?author=kentcdodds "Documentation") [👀](#review-kentcdodds "Reviewed Pull Requests") [💬](#question-kentcdodds "Answering Questions")' expect(formatContributor(options, contributor)).toBe(expected) }) @@ -53,7 +53,7 @@ test('default image size to 100', () => { delete options.imageSize const expected = - '[
Kent C. Dodds](http://kentcdodds.com)
[👀](#review-kentcdodds "Reviewed Pull Requests")' + '[Kent C. Dodds
Kent C. Dodds](http://kentcdodds.com)
[👀](#review-kentcdodds "Reviewed Pull Requests")' expect(formatContributor(options, contributor)).toBe(expected) }) @@ -63,7 +63,7 @@ test('format contributor with pipes in their name', () => { const {options} = fixtures() const expected = - '[
Who | Needs | Pipes?](http://github.com/chrisinajar)
[📖](https://github.com/all-contributors/all-contributors-cli/commits?author=pipey "Documentation")' + '[Who | Needs | Pipes?
Who | Needs | Pipes?](http://github.com/chrisinajar)
[📖](https://github.com/all-contributors/all-contributors-cli/commits?author=pipey "Documentation")' expect(formatContributor(options, contributor)).toBe(expected) }) @@ -73,7 +73,7 @@ test('format contributor with no github account', () => { const {options} = fixtures() const expected = - '
No Github Account
[🌍](#translation "Translation")' + 'No Github Account
No Github Account
[🌍](#translation "Translation")' expect(formatContributor(options, contributor)).toBe(expected) }) diff --git a/src/generate/format-contributor.js b/src/generate/format-contributor.js index 2b67ca4..f4b4611 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 %>](<%= contributor.profile %>)', @@ -17,10 +17,15 @@ const contributorTemplate = _.template( const defaultImageSize = 100 function defaultTemplate(templateData) { - const avatar = avatarTemplate(templateData) + const name = escapeName(templateData.contributor.name) + const avatar = avatarTemplate( + _.assign(templateData, { + name, + }), + ) const avatarBlockTemplateData = _.assign( { - name: escapeName(templateData.contributor.name), + name, avatar, }, templateData,