diff --git a/helpers/allowcommand.js b/scripts/kokoro.io/helpers/allowcommand.js similarity index 100% rename from helpers/allowcommand.js rename to scripts/kokoro.io/helpers/allowcommand.js diff --git a/helpers/prefix.js b/scripts/kokoro.io/helpers/prefix.js similarity index 100% rename from helpers/prefix.js rename to scripts/kokoro.io/helpers/prefix.js diff --git a/helpers/random.js b/scripts/kokoro.io/helpers/random.js similarity index 100% rename from helpers/random.js rename to scripts/kokoro.io/helpers/random.js diff --git a/helpers/runindocker.js b/scripts/kokoro.io/helpers/runindocker.js similarity index 100% rename from helpers/runindocker.js rename to scripts/kokoro.io/helpers/runindocker.js diff --git a/helpers/user.js b/scripts/kokoro.io/helpers/user.js similarity index 100% rename from helpers/user.js rename to scripts/kokoro.io/helpers/user.js diff --git a/scripts/kokoro.io/api/resizeimage.js b/scripts/kokoro.io/hubot/api/resizeimage.js similarity index 100% rename from scripts/kokoro.io/api/resizeimage.js rename to scripts/kokoro.io/hubot/api/resizeimage.js diff --git a/scripts/kokoro.io/api/slack.js b/scripts/kokoro.io/hubot/api/slack.js similarity index 100% rename from scripts/kokoro.io/api/slack.js rename to scripts/kokoro.io/hubot/api/slack.js diff --git a/scripts/kokoro.io/command.js b/scripts/kokoro.io/hubot/command.js similarity index 94% rename from scripts/kokoro.io/command.js rename to scripts/kokoro.io/hubot/command.js index e7998fc..9064ff7 100644 --- a/scripts/kokoro.io/command.js +++ b/scripts/kokoro.io/hubot/command.js @@ -1,4 +1,4 @@ -const Prefix = require('../../helpers/prefix'); +const Prefix = require('../helpers/prefix'); module.exports = (robot) => { robot.hear(Prefix.regex('/command (.*)/mi'), (msg) => { diff --git a/scripts/kokoro.io/dice.js b/scripts/kokoro.io/hubot/dice.js similarity index 86% rename from scripts/kokoro.io/dice.js rename to scripts/kokoro.io/hubot/dice.js index 98cb2f9..b9da5ca 100644 --- a/scripts/kokoro.io/dice.js +++ b/scripts/kokoro.io/hubot/dice.js @@ -1,6 +1,6 @@ -const Prefix = require('../../helpers/prefix'); -const random = require('../../helpers/random'); -const allowCommand = require('../../helpers/allowcommand'); +const Prefix = require('../helpers/prefix'); +const random = require('../helpers/random'); +const allowCommand = require('../helpers/allowcommand'); module.exports = (robot) => { robot.hear(Prefix.regex('/dice(.*)/mi'), (msg) => { diff --git a/scripts/kokoro.io/docker/bash.js b/scripts/kokoro.io/hubot/docker/bash.js similarity index 77% rename from scripts/kokoro.io/docker/bash.js rename to scripts/kokoro.io/hubot/docker/bash.js index bdde31d..be4ff81 100644 --- a/scripts/kokoro.io/docker/bash.js +++ b/scripts/kokoro.io/hubot/docker/bash.js @@ -1,6 +1,6 @@ -const Prefix = require('../../../helpers/prefix'); -const allowCommand = require('../../../helpers/allowcommand'); -const runInDocker = require('../../../helpers/runindocker'); +const Prefix = require('../../helpers/prefix'); +const allowCommand = require('../../helpers/allowcommand'); +const runInDocker = require('../../helpers/runindocker'); module.exports = (robot) => { robot.hear(Prefix.regex('/bash (.*)/mi'), (msg) => { diff --git a/scripts/kokoro.io/docker/node.js b/scripts/kokoro.io/hubot/docker/node.js similarity index 75% rename from scripts/kokoro.io/docker/node.js rename to scripts/kokoro.io/hubot/docker/node.js index 8e7580d..a0585eb 100644 --- a/scripts/kokoro.io/docker/node.js +++ b/scripts/kokoro.io/hubot/docker/node.js @@ -1,6 +1,6 @@ -const Prefix = require('../../../helpers/prefix'); -const allowCommand = require('../../../helpers/allowcommand'); -const runInDocker = require('../../../helpers/runindocker'); +const Prefix = require('../../helpers/prefix'); +const allowCommand = require('../../helpers/allowcommand'); +const runInDocker = require('../../helpers/runindocker'); module.exports = (robot) => { robot.hear(Prefix.regex('/node (.*)/mi'), (msg) => { diff --git a/scripts/kokoro.io/docker/php.js b/scripts/kokoro.io/hubot/docker/php.js similarity index 75% rename from scripts/kokoro.io/docker/php.js rename to scripts/kokoro.io/hubot/docker/php.js index 345997a..1b73c77 100644 --- a/scripts/kokoro.io/docker/php.js +++ b/scripts/kokoro.io/hubot/docker/php.js @@ -1,6 +1,6 @@ -const Prefix = require('../../../helpers/prefix'); -const allowCommand = require('../../../helpers/allowcommand'); -const runInDocker = require('../../../helpers/runindocker'); +const Prefix = require('../../helpers/prefix'); +const allowCommand = require('../../helpers/allowcommand'); +const runInDocker = require('../../helpers/runindocker'); module.exports = (robot) => { robot.hear(Prefix.regex('/php (.*)/mi'), (msg) => { diff --git a/scripts/kokoro.io/docker/python.js b/scripts/kokoro.io/hubot/docker/python.js similarity index 75% rename from scripts/kokoro.io/docker/python.js rename to scripts/kokoro.io/hubot/docker/python.js index 15b44ce..4be5cea 100644 --- a/scripts/kokoro.io/docker/python.js +++ b/scripts/kokoro.io/hubot/docker/python.js @@ -1,6 +1,6 @@ -const Prefix = require('../../../helpers/prefix'); -const allowCommand = require('../../../helpers/allowcommand'); -const runInDocker = require('../../../helpers/runindocker'); +const Prefix = require('../../helpers/prefix'); +const allowCommand = require('../../helpers/allowcommand'); +const runInDocker = require('../../helpers/runindocker'); module.exports = (robot) => { robot.hear(Prefix.regex('/python (.*)/mi'), (msg) => { diff --git a/scripts/kokoro.io/docker/ruby.js b/scripts/kokoro.io/hubot/docker/ruby.js similarity index 75% rename from scripts/kokoro.io/docker/ruby.js rename to scripts/kokoro.io/hubot/docker/ruby.js index 297cef6..439fec3 100644 --- a/scripts/kokoro.io/docker/ruby.js +++ b/scripts/kokoro.io/hubot/docker/ruby.js @@ -1,6 +1,6 @@ -const Prefix = require('../../../helpers/prefix'); -const allowCommand = require('../../../helpers/allowcommand'); -const runInDocker = require('../../../helpers/runindocker'); +const Prefix = require('../../helpers/prefix'); +const allowCommand = require('../../helpers/allowcommand'); +const runInDocker = require('../../helpers/runindocker'); module.exports = (robot) => { robot.hear(Prefix.regex('/ruby (.*)/mi'), (msg) => { diff --git a/scripts/kokoro.io/help.js b/scripts/kokoro.io/hubot/help.js similarity index 92% rename from scripts/kokoro.io/help.js rename to scripts/kokoro.io/hubot/help.js index fa00d79..3eed3bd 100644 --- a/scripts/kokoro.io/help.js +++ b/scripts/kokoro.io/hubot/help.js @@ -1,5 +1,5 @@ -const Prefix = require('../../helpers/prefix'); -const allowCommand = require('../../helpers/allowcommand'); +const Prefix = require('../helpers/prefix'); +const allowCommand = require('../helpers/allowcommand'); module.exports = (robot) => { robot.hear(Prefix.regex('/help$/mi'), (msg) => { diff --git a/scripts/kokoro.io/ikku.js b/scripts/kokoro.io/hubot/ikku.js similarity index 97% rename from scripts/kokoro.io/ikku.js rename to scripts/kokoro.io/hubot/ikku.js index 1a211ac..05bd766 100644 --- a/scripts/kokoro.io/ikku.js +++ b/scripts/kokoro.io/hubot/ikku.js @@ -1,5 +1,5 @@ const Haiku = require('@mohemohe/haiku.js').default; -const Prefix = require('../../helpers/prefix'); +const Prefix = require('../helpers/prefix'); module.exports = (robot) => { robot.hear(Prefix.regex('/ikku(.*)$/mi'), (msg) => { diff --git a/scripts/kokoro.io/kill.js b/scripts/kokoro.io/hubot/kill.js similarity index 68% rename from scripts/kokoro.io/kill.js rename to scripts/kokoro.io/hubot/kill.js index fbb04e0..44b8a06 100644 --- a/scripts/kokoro.io/kill.js +++ b/scripts/kokoro.io/hubot/kill.js @@ -1,5 +1,5 @@ -const Prefix = require('../../helpers/prefix'); -const allowCommand = require('../../helpers/allowcommand'); +const Prefix = require('../helpers/prefix'); +const allowCommand = require('../helpers/allowcommand'); module.exports = (robot) => { robot.hear(Prefix.regex('/kill$/mi'), (msg) => { diff --git a/scripts/kokoro.io/mstdn.js b/scripts/kokoro.io/hubot/mstdn.js similarity index 98% rename from scripts/kokoro.io/mstdn.js rename to scripts/kokoro.io/hubot/mstdn.js index e02588a..17497cf 100644 --- a/scripts/kokoro.io/mstdn.js +++ b/scripts/kokoro.io/hubot/mstdn.js @@ -1,6 +1,6 @@ const Mastodon = require('mastodon-api'); -const Prefix = require('../../helpers/prefix'); -const allowCommand = require('../../helpers/allowcommand'); +const Prefix = require('../helpers/prefix'); +const allowCommand = require('../helpers/allowcommand'); const Mode = { ALL: 'all', diff --git a/scripts/kokoro.io/ping.js b/scripts/kokoro.io/hubot/ping.js similarity index 61% rename from scripts/kokoro.io/ping.js rename to scripts/kokoro.io/hubot/ping.js index 620fb3b..f3d8ed5 100644 --- a/scripts/kokoro.io/ping.js +++ b/scripts/kokoro.io/hubot/ping.js @@ -1,5 +1,5 @@ -const Prefix = require('../../helpers/prefix'); -const allowCommand = require('../../helpers/allowcommand'); +const Prefix = require('../helpers/prefix'); +const allowCommand = require('../helpers/allowcommand'); module.exports = (robot) => { robot.hear(Prefix.regex('/ping$/mi'), (msg) => { diff --git a/scripts/kokoro.io/search/bis.js b/scripts/kokoro.io/hubot/search/bis.js similarity index 88% rename from scripts/kokoro.io/search/bis.js rename to scripts/kokoro.io/hubot/search/bis.js index c12f6bf..ab80763 100644 --- a/scripts/kokoro.io/search/bis.js +++ b/scripts/kokoro.io/hubot/search/bis.js @@ -1,8 +1,8 @@ const util = require('util'); const Bing = require('node-bing-api'); -const Prefix = require('../../../helpers/prefix'); -const allowCommand = require('../../../helpers/allowcommand'); -const random = require('../../../helpers/random'); +const Prefix = require('../../helpers/prefix'); +const allowCommand = require('../../helpers/allowcommand'); +const random = require('../../helpers/random'); function checkBing(msg) { if (process.env.BING_API_KEY) { diff --git a/scripts/kokoro.io/search/gis.js b/scripts/kokoro.io/hubot/search/gis.js similarity index 86% rename from scripts/kokoro.io/search/gis.js rename to scripts/kokoro.io/hubot/search/gis.js index ee04036..3220a3f 100644 --- a/scripts/kokoro.io/search/gis.js +++ b/scripts/kokoro.io/hubot/search/gis.js @@ -1,7 +1,7 @@ -const Prefix = require('../../../helpers/prefix'); +const Prefix = require('../../helpers/prefix'); const GoogleImages = require('google-images'); -const allowCommand = require('../../../helpers/allowcommand'); -const random = require('../../../helpers/random'); +const allowCommand = require('../../helpers/allowcommand'); +const random = require('../../helpers/random'); function checkGoogle(msg) { if (process.env.GOOGLE_CSE_ID && process.env.GOOGLE_API_KEY) { diff --git a/scripts/kokoro.io/search/irasutoya.js b/scripts/kokoro.io/hubot/search/irasutoya.js similarity index 78% rename from scripts/kokoro.io/search/irasutoya.js rename to scripts/kokoro.io/hubot/search/irasutoya.js index 7c60f82..9e95ce1 100644 --- a/scripts/kokoro.io/search/irasutoya.js +++ b/scripts/kokoro.io/hubot/search/irasutoya.js @@ -1,6 +1,6 @@ const irasutoya = require('@fand/irasutoya'); -const Prefix = require('../../../helpers/prefix'); -const allowCommand = require('../../../helpers/allowcommand'); +const Prefix = require('../../helpers/prefix'); +const allowCommand = require('../../helpers/allowcommand'); module.exports = (robot) => { robot.hear(Prefix.regex('/irasutoya (.*)/mi'), (msg) => { diff --git a/scripts/kokoro.io/search/lgtm.js b/scripts/kokoro.io/hubot/search/lgtm.js similarity index 84% rename from scripts/kokoro.io/search/lgtm.js rename to scripts/kokoro.io/hubot/search/lgtm.js index 1b21bb5..ea90bb9 100644 --- a/scripts/kokoro.io/search/lgtm.js +++ b/scripts/kokoro.io/hubot/search/lgtm.js @@ -1,6 +1,6 @@ const axios = require('axios'); -const Prefix = require('../../../helpers/prefix'); -const allowCommand = require('../../../helpers/allowcommand'); +const Prefix = require('../../helpers/prefix'); +const allowCommand = require('../../helpers/allowcommand'); module.exports = (robot) => { robot.hear(Prefix.regex('/lgtm/'), async (msg) => { diff --git a/scripts/kokoro.io/socialquest.js b/scripts/kokoro.io/hubot/socialquest.js similarity index 98% rename from scripts/kokoro.io/socialquest.js rename to scripts/kokoro.io/hubot/socialquest.js index bce333f..f4d2959 100644 --- a/scripts/kokoro.io/socialquest.js +++ b/scripts/kokoro.io/hubot/socialquest.js @@ -1,7 +1,7 @@ const fns = require('date-fns'); -const random = require('../../helpers/random'); -const Prefix = require('../../helpers/prefix'); -const user = require('../../helpers/user'); +const random = require('../helpers/random'); +const Prefix = require('../helpers/prefix'); +const user = require('../helpers/user'); const maxHp = 100; const dailyHeal = 10; diff --git a/scripts/loader.js b/scripts/loader.js index 6404c6b..49007fc 100644 --- a/scripts/loader.js +++ b/scripts/loader.js @@ -1,6 +1,6 @@ const glob = require('glob'); module.exports = (robot) => { - const dirs = glob.sync(`${__dirname}/**/*/`); - dirs.forEach((dir) => robot.load(dir)); -} \ No newline at end of file + const dirs = glob.sync(`${__dirname}/*/hubot/**/`); + dirs.forEach((dir) => robot.load(dir)); +}