Skip to content

Commit

Permalink
feat(bitbucket): Enable HTTP cache for issues (#28030)
Browse files Browse the repository at this point in the history
  • Loading branch information
zharinov committed Mar 19, 2024
1 parent fcffdc9 commit 4c8d3d4
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions lib/modules/platform/bitbucket/index.ts
Expand Up @@ -670,13 +670,11 @@ export async function getIssueList(): Promise<Issue[]> {
filters.push(`reporter.uuid="${renovateUserUuid}"`);
}
const filter = encodeURIComponent(filters.join(' AND '));
return (
(
await bitbucketHttp.getJson<{ values: Issue[] }>(
`/2.0/repositories/${config.repository}/issues?q=${filter}`,
)
).body.values || []
);
const url = `/2.0/repositories/${config.repository}/issues?q=${filter}`;
const res = await bitbucketHttp.getJson<{ values: Issue[] }>(url, {
cacheProvider: repoCacheProvider,
});
return res.body.values || [];
} catch (err) {
logger.warn({ err }, 'Error finding issues');
return [];
Expand Down

0 comments on commit 4c8d3d4

Please sign in to comment.