From 11b1b0ea518fa6afa1a5e3331a9e5bc34af9a121 Mon Sep 17 00:00:00 2001 From: Rhys Arkins <rhys@keylocation.sg> Date: Tue, 17 Oct 2017 13:22:53 +0200 Subject: [PATCH] fix: add missing await after findPr (#965) --- lib/workers/branch/check-existing.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/workers/branch/check-existing.js b/lib/workers/branch/check-existing.js index 6fdd4621d3..8557831f53 100644 --- a/lib/workers/branch/check-existing.js +++ b/lib/workers/branch/check-existing.js @@ -14,7 +14,11 @@ async function prAlreadyExisted(config) { logger.debug('recreateClosed is false'); // Return if same PR already existed // Check for current PR title format - const pr = config.api.findPr(config.branchName, config.prTitle, 'closed'); + const pr = await config.api.findPr( + config.branchName, + config.prTitle, + 'closed' + ); if (pr) { logger.debug('Found closed PR with current title'); // this code exists to ignore mistakenly closed PRs which occurred due to a bug -- GitLab