diff --git a/lib/workers/pr/changelog/source-github.js b/lib/workers/pr/changelog/source-github.js index 7ff9f7404f404d4466339add67dd9c913b21e17f..23fc1a8996e52d4c8d27da516fa424c0e6be77b1 100644 --- a/lib/workers/pr/changelog/source-github.js +++ b/lib/workers/pr/changelog/source-github.js @@ -112,8 +112,8 @@ async function getChangeLogJSON({ } const cacheNamespace = 'changelog-github-release'; - function getCacheKey(version) { - return `${repository}:${version}`; + function getCacheKey(prev, next) { + return `${repository}:${prev}:${next}`; } const changelogReleases = []; @@ -126,7 +126,7 @@ async function getChangeLogJSON({ if (include(next.version)) { let release = await renovateCache.get( cacheNamespace, - getCacheKey(next.version) + getCacheKey(prev.version, next.version) ); if (!release) { release = { diff --git a/test/workers/pr/changelog/__snapshots__/index.spec.js.snap b/test/workers/pr/changelog/__snapshots__/index.spec.js.snap index 67581a19c878f369e10037190059c3d25f425bd6..2709414b6ad1fa4037b598200734d208a93d4a4c 100644 --- a/test/workers/pr/changelog/__snapshots__/index.spec.js.snap +++ b/test/workers/pr/changelog/__snapshots__/index.spec.js.snap @@ -163,6 +163,7 @@ Object { Object { "changes": Array [], "compare": Object {}, + "date": undefined, "releaseNotes": undefined, "version": "2.5.2", }, @@ -189,6 +190,7 @@ Object { "compare": Object { "url": "https://github-enterprise.example.com/chalk/chalk/compare/npm_1.0.0...npm_2.2.2", }, + "date": undefined, "releaseNotes": Object { "url": "https://github-enterprise.example.com/chalk/chalk/compare/npm_1.0.0...npm_2.2.2", },