hubot-aws-insight
Version:
A hubot scripts that shows you what's running on aws. Needs Python 3
18 lines (16 loc) • 485 B
JavaScript
const fs = require('fs');
const path = require('path');
module.exports = function(robot, scripts) {
const scriptsPath = path.resolve(__dirname, 'src');
if (fs.existsSync(scriptsPath)) {
for (let script of fs.readdirSync(scriptsPath).sort()) {
if (scripts != null && !scripts.includes('*')) {
if (scripts.includes(script)) {
robot.loadFile(scriptsPath, script);
}
} else {
robot.loadFile(scriptsPath, script);
}
}
}
};