Skip to content

Commit

Permalink
don't pull each issue on outdated
Browse files Browse the repository at this point in the history
  • Loading branch information
specialblend committed Jan 3, 2025
1 parent 49b9808 commit eb5eec6
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/Command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,7 @@ export function ListReviewsCommand(
storage: Deno.Kv,
settings: SettingsV1,
): Command {
const issueService = IssueService(storage);
const issueStore = IssueStore(storage);
const ollama = new Ollama(settings.ollama);
const reviewService = ReviewService(ollama, storage, settings);

Expand Down Expand Up @@ -647,9 +647,7 @@ export function ListReviewsCommand(
async function keepOutdated(reviews: Review[]): Promise<Review[]> {
const outdated = [];
for await (const review of reviews) {
const issue = await issueService
.pullIssue(review.key)
.catch(() => null);
const issue = await issueStore.get(review.key).catch(() => null);
if (issue) {
const diff = await reviewService.diff(issue);
if (diff.outdated) outdated.push(review);
Expand Down

0 comments on commit eb5eec6

Please sign in to comment.