mirror of
https://github.com/all-contributors/cli.git
synced 2025-01-10 14:06:34 +00:00
16 lines
467 B
JavaScript
16 lines
467 B
JavaScript
'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);
|
|
});
|
|
});
|
|
};
|