Skip to content

Commit

Permalink
feat(bitbucket): Cache reviewer sanitation requests (#28694)
Browse files Browse the repository at this point in the history
  • Loading branch information
zharinov committed Apr 27, 2024
1 parent 9468c10 commit 7bfddb4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/modules/platform/bitbucket/index.ts
Expand Up @@ -782,7 +782,10 @@ async function sanitizeReviewers(
// Validate that each previous PR reviewer account is still active
for (const reviewer of reviewers) {
const reviewerUser = (
await bitbucketHttp.getJson<Account>(`/2.0/users/${reviewer.uuid}`)
await bitbucketHttp.getJson<Account>(
`/2.0/users/${reviewer.uuid}`,
{ memCache: true },
)
).body;

if (reviewerUser.account_status === 'active') {
Expand Down Expand Up @@ -836,6 +839,7 @@ async function isAccountMemberOfWorkspace(
try {
await bitbucketHttp.get(
`/2.0/workspaces/${workspace}/members/${reviewer.uuid}`,
{ memCache: true },
);

return true;
Expand Down

0 comments on commit 7bfddb4

Please sign in to comment.