Skip to content
Snippets Groups Projects
Commit 1f7b25e5 authored by Rhys Arkins's avatar Rhys Arkins
Browse files

fix: cache changelog on from/to

parent 562ca438
Branches
No related tags found
No related merge requests found
......@@ -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 = {
......
......@@ -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",
},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment