Skip to content

Commit

Permalink
fix: ci issues
Browse files Browse the repository at this point in the history
  • Loading branch information
RahulGautamSingh committed Dec 31, 2024
1 parent 3fa1b53 commit 71b07ea
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/modules/platform/github/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1247,7 +1247,7 @@ export async function getIssue(number: number): Promise<Issue | null> {
GithubIssueCache.updateIssue(issue);
return issue;
} catch (err) /* istanbul ignore next */ {
logger.debug({ err, number: number }, 'Error getting issue');
logger.debug({ err, number }, 'Error getting issue');
// istanbul ignore if
if (err.message === 'Response Code 410(Gone)') {
logger.debug(`Issue #${number} has been deleted`);
Expand Down
26 changes: 26 additions & 0 deletions lib/modules/platform/github/issue.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,32 @@ describe('modules/platform/github/issue', () => {
});
});

it('removes particular issue from the cache', () => {
cache.platform = {
github: {
issuesCache: {
'1': {
number: 1,
body: 'body-1',
state: 'open',
title: 'title-1',
lastModified: '2020-01-01T00:00:00.000Z',
},
},
},
};

GithubIssueCache.deleteIssue(1);

expect(cache).toEqual({
platform: {
github: {
issuesCache: {},
},
},
});
});

it('reconciles cache', () => {
cache.platform = {
github: {
Expand Down

0 comments on commit 71b07ea

Please sign in to comment.