git-authors
v0.1.0
Published
List all authors that have contributed to a git project in descending order, based on the number of commits.
Downloads
7
Maintainers
Readme
git-authors
List all the authors that have contributed to a git project in descending order, based on the number of commits.
Usage
gitAuthors(repoPath, [revision], callback);
Example:
var gitAuthors = require('git-authors');
var path = require('path');
var repoPath = path.resolve(process.env.REPO || (__dirname + '/.git'));
gitAuthors(repoPath, function(err, list) {
if (err) { throw err; }
console.log(list);
});
Sample output:
[{
"commits": "83",
"name": "James Hall",
"email": "[email protected]"
}, {
"commits": "4",
"name": "Matt Summers",
"email": "[email protected]"
}, {
"commits": "2",
"name": "Julian Meyer",
"email": "[email protected]"
}, {
"commits": "2",
"name": "Max Thunder",
"email": "[email protected]"
}, {
"commits": "2",
"name": "John",
"email": "[email protected]"
}, {
"commits": "1",
"name": "Daniel Doe",
"email": "[email protected]"
}, {
"commits": "1",
"name": "Duncan",
"email": "[email protected]"
}, {
"commits": "1",
"name": "Hugh Doe",
"email": "[email protected]"
}, {
"commits": "1",
"name": "Mark Doe",
"email": "[email protected]"
}, {
"commits": "1",
"name": "Maximilian Doe",
"email": "[email protected]"
}, {
"commits": "1",
"name": "Mikeal Doe",
"email": "[email protected]"
}, {
"commits": "1",
"name": "Max Doe",
"email": "[email protected]"
}]
Tests
npm test
License
MIT