mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-13 07:26:26 +00:00
refactor(github): log graphql pr numbers
This commit is contained in:
parent
dc038b3962
commit
b4fe18dbbd
1 changed files with 4 additions and 0 deletions
|
@ -882,6 +882,7 @@ async function getOpenPrs() {
|
||||||
json: false,
|
json: false,
|
||||||
};
|
};
|
||||||
const res = JSON.parse((await get.post(url, options)).body);
|
const res = JSON.parse((await get.post(url, options)).body);
|
||||||
|
const prNumbers = [];
|
||||||
for (const pr of res.data.repository.pullRequests.nodes) {
|
for (const pr of res.data.repository.pullRequests.nodes) {
|
||||||
// https://developer.github.com/v4/object/pullrequest/
|
// https://developer.github.com/v4/object/pullrequest/
|
||||||
pr.displayNumber = `Pull Request #${pr.number}`;
|
pr.displayNumber = `Pull Request #${pr.number}`;
|
||||||
|
@ -935,7 +936,10 @@ async function getOpenPrs() {
|
||||||
delete pr.mergeStateStatus;
|
delete pr.mergeStateStatus;
|
||||||
delete pr.commits;
|
delete pr.commits;
|
||||||
openPrList[pr.number] = pr;
|
openPrList[pr.number] = pr;
|
||||||
|
prNumbers.push(pr.number);
|
||||||
}
|
}
|
||||||
|
prNumbers.sort();
|
||||||
|
logger.info({ prNumbers }, 'Retrieved open PR list with graphql');
|
||||||
} catch (err) /* istanbul ignore next */ {
|
} catch (err) /* istanbul ignore next */ {
|
||||||
logger.warn({ err }, 'getOpenPrs error');
|
logger.warn({ err }, 'getOpenPrs error');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue