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'); }