From e7eada122ea1f23b1a689b6e6ad2476dc65b6737 Mon Sep 17 00:00:00 2001 From: Mary Marchini Date: Sat, 15 Aug 2020 00:22:41 -0700 Subject: [PATCH] chore: promisified getBotPrLabels --- lib/node-repo.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/node-repo.js b/lib/node-repo.js index 5467f98a..ac04961f 100644 --- a/lib/node-repo.js +++ b/lib/node-repo.js @@ -149,11 +149,7 @@ function getBotPrLabels (options, cb) { page: 1, per_page: 100, // we probably won't hit this number: options.prId - }, (err, res) => { - if (err) { - return cb(err) - } - + }).then(res => { const events = res.data || [] const ourLabels = [] @@ -174,7 +170,7 @@ function getBotPrLabels (options, cb) { } cb(null, ourLabels) - }) + }, cb) } function stringsInCommon (arr1, arr2) {