mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-10 05:39:11 +00:00
Skip indexing commits that are missing properties
This commit is contained in:
@@ -192,7 +192,10 @@ class GithubToEntries(TextToEntries):
|
|||||||
|
|
||||||
# Extract commit messages from the response
|
# Extract commit messages from the response
|
||||||
for commit in content:
|
for commit in content:
|
||||||
|
if "commit" in commit and "message" in commit["commit"] and "html_url" in commit:
|
||||||
commits += [{"content": commit["commit"]["message"], "path": commit["html_url"]}]
|
commits += [{"content": commit["commit"]["message"], "path": commit["html_url"]}]
|
||||||
|
else:
|
||||||
|
logger.debug(f"Skipping commit with missing properties: {commit}")
|
||||||
|
|
||||||
# Get the URL for the next page of commits, if any
|
# Get the URL for the next page of commits, if any
|
||||||
commits_url = response.links.get("next", {}).get("url")
|
commits_url = response.links.get("next", {}).get("url")
|
||||||
|
|||||||
Reference in New Issue
Block a user