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

fix: cache github requests that include a host prefix

We were only caching GET requests that start with `repos/` and so this skipped URLs requested by our release-notes (CHANGELOG.md) function.
parent c4d8c36f
No related branches found
No related tags found
No related merge requests found
......@@ -47,7 +47,11 @@ async function get(path, opts, retries = 5) {
);
}
}
if (method === 'get' && path.startsWith('repos/')) {
if (
method === 'get' &&
(path.startsWith('repos/') ||
path.startsWith('https://api.github.com/repos/'))
) {
cache[path] = res;
}
return res;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment