all-contributors-cli/lib/contributors/index.js

17 lines
465 B
JavaScript
Raw Normal View History

2016-03-02 22:45:23 +00:00
'use strict';
var add = require('./add');
var github = require('./github');
var configFile = require('../configFile');
module.exports = function addContributor(options, username, contributions, cb) {
add(options, username, contributions, github, function(error, contributors) {
if (error) {
return cb(error);
}
configFile.writeContributors(options.config, contributors, function(error) {
return cb(error, contributors);
});
});
};