diff --git a/lib/workers/pr/changelog/source-github.js b/lib/workers/pr/changelog/source-github.js index fd8bb8b4f58e8168a316d891fecef746fac2474a..7ff9f7404f404d4466339add67dd9c913b21e17f 100644 --- a/lib/workers/pr/changelog/source-github.js +++ b/lib/workers/pr/changelog/source-github.js @@ -95,9 +95,12 @@ async function getChangeLogJSON({ return null; } - const tags = await getTags(config.endpoint, versionScheme, repository); + let tags; - function getRef(release) { + async function getRef(release) { + if (!tags) { + tags = await getTags(config.endpoint, versionScheme, repository); + } const tagName = tags.find(tag => equals(tag, release.version)); if (tagName) { return tagName;