From 66e3e33235f4b369a21ebfb59e687bccd8162d4a Mon Sep 17 00:00:00 2001 From: Carlos Espa Date: Tue, 23 Jul 2024 01:05:02 +0200 Subject: [PATCH] fixup! lint fix --- lib/jenkins-events.js | 4 ++-- lib/push-jenkins-update.js | 4 ++-- scripts/jenkins-status.js | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/jenkins-events.js b/lib/jenkins-events.js index 033f3943..e827db53 100644 --- a/lib/jenkins-events.js +++ b/lib/jenkins-events.js @@ -66,7 +66,7 @@ module.exports = (app, events) => { res.end() }) - app.emitJenkinsEvent = function emitJenkinsEvent (event, data, logger) { + app.emitJenkinsEvent = async function emitJenkinsEvent (event, data, logger) { const { identifier } = data // create unique logger which is easily traceable throughout the entire app @@ -78,7 +78,7 @@ module.exports = (app, events) => { data.logger.info('Emitting Jenkins event') debug(data) - events.emit('jenkins', data) + await events.emit('jenkins', data) return events.emit(`jenkins.${event}`, data) } } diff --git a/lib/push-jenkins-update.js b/lib/push-jenkins-update.js index 7ed3124f..a2978dd5 100644 --- a/lib/push-jenkins-update.js +++ b/lib/push-jenkins-update.js @@ -31,7 +31,7 @@ function pushStarted (options, build, cb) { } } - findLatestCommitInPr(optsWithPr).then(latestCommit => { + return findLatestCommitInPr(optsWithPr).then(latestCommit => { const statusOpts = Object.assign({ sha: latestCommit.sha, url: build.url, @@ -40,7 +40,7 @@ function pushStarted (options, build, cb) { message: build.message || 'running tests' }, options) - createGhStatus(statusOpts, logger).then(cb).catch(cb) + return createGhStatus(statusOpts, logger).then(cb).catch(cb) }, err => { logger.error(err, 'Got error when retrieving GitHub commits for PR') return cb(err) diff --git a/scripts/jenkins-status.js b/scripts/jenkins-status.js index f9feaf0a..6ead62f1 100644 --- a/scripts/jenkins-status.js +++ b/scripts/jenkins-status.js @@ -5,7 +5,7 @@ const pushJenkinsUpdate = require('../lib/push-jenkins-update') function handleJenkinsStart (event) { const { repo, owner } = event - pushJenkinsUpdate.pushStarted({ + return pushJenkinsUpdate.pushStarted({ owner, repo, logger: event.logger @@ -19,7 +19,7 @@ function handleJenkinsStart (event) { function handleJenkinsStop (event) { const { repo, owner } = event - pushJenkinsUpdate.pushEnded({ + return pushJenkinsUpdate.pushEnded({ owner, repo, logger: event.logger