Last active
October 14, 2017 13:57
-
-
Save vdavez/efef2247a0b52f7e47f6 to your computer and use it in GitHub Desktop.
Onboarding
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
var utils = require('./utils'); | |
/** | |
* @param {Object} - the configuration object | |
*/ | |
var addUser = (opts) => { | |
utils._addToGithub(opts.user); | |
utils._addToSlack(opts.user, opts.channel); | |
} | |
module.exports = addUser; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var addUser = require('./onboard'); | |
var options = { | |
'channel': 'testchannel', | |
'user':{'github': 'test', 'slack': 'testing'} | |
}; | |
addUser(options); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
/** | |
* @param {Object} - the user to be added | |
*/ | |
exports._addToGithub = user => { | |
console.log("user " + user["github"] + " added to github."); | |
} | |
/** | |
* @param {Object} - the user to be added | |
* @param {string} - the channel to be added to | |
*/ | |
exports._addToSlack = (user, channel) => { | |
console.log("user " + user["slack"] + " added to slack channel " + channel + "."); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment