Add logging for script loading

This commit is contained in:
Pedro Pombeiro 2018-02-06 12:01:08 +01:00
parent 8ce1c9cd1f
commit 44ff193733
No known key found for this signature in database
GPG Key ID: A65DEB11E4BBC647

View File

@ -1,11 +1,11 @@
var MemCache = require('mem-cache') let MemCache = require('mem-cache')
var SlackGitHubCacheBuilder = require('./lib/retrieve-slack-github-users') let SlackGitHubCacheBuilder = require('./lib/retrieve-slack-github-users')
module.exports = async (robot) => { module.exports = async (robot) => {
console.log('Yay, the app was loaded!') console.log('Yay, the app was loaded!')
var slackGitHubCache = new MemCache({ timeoutDisabled: true }) let slackGitHubCache = new MemCache({ timeoutDisabled: true })
var slackCachePromise = SlackGitHubCacheBuilder.build(robot, slackGitHubCache) let slackCachePromise = SlackGitHubCacheBuilder.build(robot, slackGitHubCache)
require('./bot_scripts/assign-new-pr-to-review')(robot) require('./bot_scripts/assign-new-pr-to-review')(robot)
require('./bot_scripts/assign-approved-pr-to-test')(robot) require('./bot_scripts/assign-approved-pr-to-test')(robot)
@ -13,6 +13,7 @@ module.exports = async (robot) => {
require('./bot_scripts/greet-new-contributor')(robot) require('./bot_scripts/greet-new-contributor')(robot)
await slackCachePromise await slackCachePromise
robot.log.info('Slack username cache populated, loading remainder of scripts')
// Add scripts which require using the Slack/GitHub cache after this comment // Add scripts which require using the Slack/GitHub cache after this comment