trigger-automation-test-build: Improve logging
This commit is contained in:
parent
ee082627c4
commit
84642ac51f
|
@ -26,6 +26,8 @@ module.exports = (robot) => {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
robot.log.info(`${botName} - Starting up`)
|
||||||
|
|
||||||
setInterval(checkPendingPullRequests, 5 * 1000 * 60, robot)
|
setInterval(checkPendingPullRequests, 5 * 1000 * 60, robot)
|
||||||
registerForRelevantCardEvents(robot)
|
registerForRelevantCardEvents(robot)
|
||||||
}
|
}
|
||||||
|
@ -50,6 +52,8 @@ async function processChangedProjectCard (robot, context) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
robot.log.debug(`${botName} - Processing changed project card`, payload.project_card)
|
||||||
|
|
||||||
if (payload.project_card.note) {
|
if (payload.project_card.note) {
|
||||||
robot.log.trace(`${botName} - Card is a note, ignoring`)
|
robot.log.trace(`${botName} - Card is a note, ignoring`)
|
||||||
return
|
return
|
||||||
|
@ -165,11 +169,11 @@ async function processPullRequest (context, robot, prInfo, fullJobName) {
|
||||||
async function checkPendingPullRequests (robot) {
|
async function checkPendingPullRequests (robot) {
|
||||||
const _pendingPullRequests = pendingPullRequests.clone()
|
const _pendingPullRequests = pendingPullRequests.clone()
|
||||||
|
|
||||||
robot.log.trace(`${botName} - Processing ${_pendingPullRequests.size} pending PRs`)
|
robot.log.debug(`${botName} - Processing ${_pendingPullRequests.size} pending PRs`)
|
||||||
|
|
||||||
for (const { github, prInfo, fullJobName } of _pendingPullRequests.values()) {
|
for (const { github, prInfo, fullJobName } of _pendingPullRequests.values()) {
|
||||||
await processPullRequest(github, robot, prInfo, fullJobName)
|
await processPullRequest(github, robot, prInfo, fullJobName)
|
||||||
}
|
}
|
||||||
|
|
||||||
robot.log.trace(`${botName} - Finished processing ${_pendingPullRequests.size} pending PRs`)
|
robot.log.debug(`${botName} - Finished processing ${_pendingPullRequests.size} pending PRs`)
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "probot run ./index.js",
|
"start": "probot run ./index.js",
|
||||||
"test": "jest && standard",
|
"test": "jest && standard",
|
||||||
"logs": "ssh dokku.status.im tail -n 100 -f /var/log/docker/status-github-bot.web.1/docker.log",
|
"logs": "ssh dokku.status.im tail -n 100 -f /var/log/docker/status-github-bot.web.1/docker.log | sed -r 's|node-01.do-ams3.dokku.misc docker/||g'",
|
||||||
"run-checks": "ssh dokku.status.im dokku checks:run status-github-bot"
|
"run-checks": "ssh dokku.status.im dokku checks:run status-github-bot"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
Loading…
Reference in New Issue