From b4fe18dbbd9c79cd4f6f6ce063e092924f605b7a Mon Sep 17 00:00:00 2001 From: Rhys Arkins Date: Tue, 11 Sep 2018 06:33:39 +0200 Subject: [PATCH] refactor(github): log graphql pr numbers --- lib/platform/github/index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/platform/github/index.js b/lib/platform/github/index.js index 07d162a2b2..090730b877 100644 --- a/lib/platform/github/index.js +++ b/lib/platform/github/index.js @@ -882,6 +882,7 @@ async function getOpenPrs() { json: false, }; const res = JSON.parse((await get.post(url, options)).body); + const prNumbers = []; for (const pr of res.data.repository.pullRequests.nodes) { // https://developer.github.com/v4/object/pullrequest/ pr.displayNumber = `Pull Request #${pr.number}`; @@ -935,7 +936,10 @@ async function getOpenPrs() { delete pr.mergeStateStatus; delete pr.commits; openPrList[pr.number] = pr; + prNumbers.push(pr.number); } + prNumbers.sort(); + logger.info({ prNumbers }, 'Retrieved open PR list with graphql'); } catch (err) /* istanbul ignore next */ { logger.warn({ err }, 'getOpenPrs error'); }