diff --git a/lib/modules/platform/github/index.ts b/lib/modules/platform/github/index.ts index 5a3bcab757b5a9727933b5d9704fdc50c5c0e395..8f448afa89b1653f5e0ca52b7ef97e296e7e76f2 100644 --- a/lib/modules/platform/github/index.ts +++ b/lib/modules/platform/github/index.ts @@ -65,7 +65,7 @@ import { vulnerabilityAlertsQuery, } from './graphql'; import { massageMarkdownLinks } from './massage-markdown-links'; -import { getPrCache } from './pr'; +import { getPrCache, updatePrCache } from './pr'; import type { BranchProtection, CombinedBranchStatus, @@ -569,6 +569,7 @@ export async function getRepoForceRebase(): Promise<boolean> { function cachePr(pr?: GhPr | null): void { config.prList ??= []; if (pr) { + updatePrCache(pr); for (let idx = 0; idx < config.prList.length; idx += 1) { const cachedPr = config.prList[idx]; if (cachedPr.number === pr.number) { diff --git a/lib/modules/platform/github/pr.ts b/lib/modules/platform/github/pr.ts index f1064b875fa63dc7c99e521bf9c3999bc27e6132..ac8c011692b6c061755966dbb2bb7e3861252fff 100644 --- a/lib/modules/platform/github/pr.ts +++ b/lib/modules/platform/github/pr.ts @@ -140,3 +140,8 @@ export async function getPrCache( return prApiCache.getItems(); } + +export function updatePrCache(pr: GhPr): void { + const cache = getPrApiCache(); + cache.updateItem(pr); +}