novaugust/top-gh-contribs — pull request #1 by ErisDS (2014-09-24 18:58:07+00:00)
Title: Switches to using compare endpoint

This is a pretty messy PR that just comments out the old behaviour and adds new stuff, feel free to take it as is or do your own - just wanted to get this out there

ref TryGhost/Ghost#4130

- uses githubs /compare/from..to endpoint
- processes commits into contributors
- excludes merges
- adds real name just cos
- adds first line of each commit for testing purposes

---

Example output from this PR for 0.5.0..0.5.1:
```
[ { commitCount: 9,
name: 'ErisDS',
realName: 'Hannah Wolfe',
githubUrl: 'https://github.com/ErisDS',
avatarUrl: 'https://avatars.githubusercontent.com/u/101513?v=2'
},
{ commitCount: 4,
name: 'felixrieseberg',
realName: 'Felix Rieseberg',
githubUrl: 'https://github.com/felixrieseberg',
avatarUrl: 'https://avatars.githubusercontent.com/u/1426799?v=2'
},
{ commitCount: 1,
name: 'jaswilli',
realName: 'Jason Williams',
githubUrl: 'https://github.com/jaswilli',
avatarUrl: 'https://avatars.githubusercontent.com/u/214142?v=2'
},
{ commitCount: 1,
name: 'sebgie',
realName: 'Sebastian Gierlinger',
githubUrl: 'https://github.com/sebgie',
avatarUrl: 'https://avatars.githubusercontent.com/u/539213?v=2'
},
{ commitCount: 1,
name: 'novaugust',
realName: 'Matt Enlow',
githubUrl: 'https://github.com/novaugust',
avatarUrl: 'https://avatars.githubusercontent.com/u/1207005?v=2' } ]
```
> $ git shortlog -sn --no-merges 0.5.0..0.5.1
```
9 Hannah Wolfe
4 Felix Rieseberg
1 Jason Williams
1 Matt Enlow
1 Sebastian Gierlinger
```

Which matches.. but then for 0.5.0..0.5.2-1 we get something with some commits from various parts of the tree missing:

```
contributors [ { commitCount: 76,
name: 'JohnONolan',
realName: 'John O\'Nolan',
githubUrl: 'https://github.com/JohnONolan',
avatarUrl: 'https://avatars.githubusercontent.com/u/120485?v=2' },
{ commitCount: 34,
name: 'PaulAdamDavis',
realName: 'Paul Adam Davis',
githubUrl: 'https://github.com/PaulAdamDavis',
avatarUrl: 'https://avatars.githubusercontent.com/u/390392?v=2' },
{ commitCount: 15,
name: 'ErisDS',
realName: 'Hannah Wolfe',
githubUrl: 'https://github.com/ErisDS',
avatarUrl: 'https://avatars.githubusercontent.com/u/101513?v=2' },
{ commitCount: 13,
name: 'jaswilli',
realName: 'Jason Williams',
githubUrl: 'https://github.com/jaswilli',
avatarUrl: 'https://avatars.githubusercontent.com/u/214142?v=2' },
{ commitCount: 12,
name: 'felixrieseberg',
realName: 'Felix Rieseberg',
githubUrl: 'https://github.com/felixrieseberg',
avatarUrl: 'https://avatars.githubusercontent.com/u/1426799?v=2' },
{ commitCount: 6,
name: 'halfdan',
realName: 'Fabian Becker',
githubUrl: 'https://github.com/halfdan',
avatarUrl: 'https://avatars.githubusercontent.com/u/176576?v=2' },
{ commitCount: 5,
name: 'novaugust',
realName: 'Matt Enlow',
githubUrl: 'https://github.com/novaugust',
avatarUrl: 'https://avatars.githubusercontent.com/u/1207005?v=2' },
{ commitCount: 3,
name: 'hswolff',
realName: 'Harry Wolff',
githubUrl: 'https://github.com/hswolff',
avatarUrl: 'https://avatars.githubusercontent.com/u/322576?v=2' },
{ commitCount: 3,
name: 'rwjblue',
realName: 'Robert Jackson',
githubUrl: 'https://github.com/rwjblue',
avatarUrl: 'https://avatars.githubusercontent.com/u/12637?v=2' },
{ commitCount: 2,
name: 'SiR-DanieL',
realName: 'Nicola Mustone',
githubUrl: 'https://github.com/SiR-DanieL',
avatarUrl: 'https://avatars.githubusercontent.com/u/4429413?v=2' },
{ commitCount: 2,
name: 'jillesme',
realName: 'Jilles Soeters',
githubUrl: 'https://github.com/jillesme',
avatarUrl: 'https://avatars.githubusercontent.com/u/2955483?v=2' },
{ commitCount: 1,
name: 'studioromeo',
realName: 'Robert Rhoades',
githubUrl: 'https://github.com/studioromeo',
avatarUrl: 'https://avatars.githubusercontent.com/u/846587?v=2' },
{ commitCount: 1,
name: 'cobbspur',
realName: 'cobbspur',
githubUrl: 'https://github.com/cobbspur',
avatarUrl: 'https://avatars.githubusercontent.com/u/4405395?v=2' },
{ commitCount: 1,
name: 'JoshWillik',
realName: 'Josh Vanderwillik',
githubUrl: 'https://github.com/JoshWillik',
avatarUrl: 'https://avatars.githubusercontent.com/u/2429492?v=2' },
{ commitCount: 1,
name: 'wjake',
realName: 'Jake Wright',
githubUrl: 'https://github.com/wjake',
avatarUrl: 'https://avatars.githubusercontent.com/u/4590364?v=2' },
{ commitCount: 1,
name: 'sebgie',
realName: 'Sebastian Gierlinger',
githubUrl: 'https://github.com/sebgie',
avatarUrl: 'https://avatars.githubusercontent.com/u/539213?v=2' },
{ commitCount: 1,
name: 'blia',
realName: 'Kirill Yakovenko',
githubUrl: 'https://github.com/blia',
avatarUrl: 'https://avatars.githubusercontent.com/u/242004?v=2' },
{ commitCount: 1,
name: 'pedro-teixeira',
realName: 'Pedro Teixeira',
githubUrl: 'https://github.com/pedro-teixeira',
avatarUrl: 'https://avatars.githubusercontent.com/u/1923771?v=2' },
{ commitCount: 1,
name: 'JayBeavers',
realName: 'Jay Beavers',
githubUrl: 'https://github.com/JayBeavers',
avatarUrl: 'https://avatars.githubusercontent.com/u/1682199?v=2' } ]
```

$ git shortlog -sn --no-merges 0.5.0..0.5.2-1

```
122 John O'Nolan
87 Paul Adam Davis
15 Hannah Wolfe
13 Jason Williams
12 Felix Rieseberg
10 Fabian Becker
5 Matt Enlow
3 Harry Wolff
3 Robert Jackson
2 David Blurton
2 Jilles Soeters
2 Nicola Mustone
1 Andrej Mlinarević
1 Jake Wright
1 Jay Beavers
1 Josh Vanderwillik
1 Kirill Yakovenko
1 Maurice Williams
1 Pedro Teixeira
1 Robert Rhoades
1 Sebastian Gierlinger
1 cobbspur
```

See the [full output from this pr](https://gist.github.com/ErisDS/8dbcd5aea191e8e6f1b1) vs [the full output from shortlog](https://gist.github.com/ErisDS/10b5c103cb396abf5296) for more details to compare.

I think this PR still yields usable results? Your about page commit is there for example.