Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(github): Change github-related field types for repo cache #27784

Merged
merged 4 commits into from Mar 10, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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;
zharinov marked this conversation as resolved.
Show resolved Hide resolved
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;
zharinov marked this conversation as resolved.
Show resolved Hide resolved
};
github?: Record<string, unknown>;
github?: {
/**
* To avoid circular dependency problem, we use `unknown` type here.
*/
pullRequestsCache?: unknown;
graphqlPageCache?: unknown;
};
bitbucket?: {
pullRequestsCache?: BitbucketPrCacheData;
};
Expand Down