Skip to content

Commit

Permalink
refactor(github): Change github-related field types for repo cache (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
zharinov committed Mar 10, 2024
1 parent 7142d40 commit 674ace8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 0 additions & 1 deletion lib/modules/platform/github/pr.ts
Expand Up @@ -12,7 +12,6 @@ function getPrApiCache(): ApiCache<GhPr> {
const repoCache = getCache();
repoCache.platform ??= {};
repoCache.platform.github ??= {};
delete repoCache.platform.github.prCache;
repoCache.platform.github.pullRequestsCache ??= { items: {} };
const prApiCache = new ApiCache<GhPr>(
repoCache.platform.github.pullRequestsCache as ApiPageCache<GhPr>,
Expand Down
8 changes: 7 additions & 1 deletion lib/util/cache/repository/types.ts
Expand Up @@ -144,7 +144,13 @@ export interface RepoCacheData {
gitea?: {
pullRequestsCache?: GiteaPrCacheData;
};
github?: Record<string, unknown>;
github?: {
/**
* To avoid circular dependency problem, we use `unknown` type here.
*/
pullRequestsCache?: unknown;
graphqlPageCache?: unknown;
};
bitbucket?: {
pullRequestsCache?: BitbucketPrCacheData;
};
Expand Down

0 comments on commit 674ace8

Please sign in to comment.