From 596e11ec6db8442995fdbf6004ecc3c38764003c Mon Sep 17 00:00:00 2001 From: sabaimran Date: Fri, 21 Jul 2023 13:23:56 -0700 Subject: [PATCH] Use the same function for computing entries for IDs regardless of whether it has prev entries --- src/khoj/processor/github/github_to_jsonl.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/khoj/processor/github/github_to_jsonl.py b/src/khoj/processor/github/github_to_jsonl.py index 91dbd6da..ddab24ce 100644 --- a/src/khoj/processor/github/github_to_jsonl.py +++ b/src/khoj/processor/github/github_to_jsonl.py @@ -84,12 +84,9 @@ class GithubToJsonl(TextToJsonl): def update_entries_with_ids(self, current_entries, previous_entries): # Identify, mark and merge any new entries with previous entries with timer("Identify new or updated entries", logger): - if not previous_entries: - entries_with_ids = list(enumerate(current_entries)) - else: - entries_with_ids = TextToJsonl.mark_entries_for_update( - current_entries, previous_entries, key="compiled", logger=logger - ) + entries_with_ids = TextToJsonl.mark_entries_for_update( + current_entries, previous_entries, key="compiled", logger=logger + ) with timer("Write github entries to JSONL file", logger): # Process Each Entry from All Notes Files