mirror of
https://github.com/khoj-ai/khoj.git
synced 2025-02-17 08:04:21 +00:00
Skip indexing commits that are missing properties
This commit is contained in:
parent
376eaf64cd
commit
731ad03348
1 changed files with 4 additions and 1 deletions
|
@ -192,7 +192,10 @@ class GithubToEntries(TextToEntries):
|
|||
|
||||
# Extract commit messages from the response
|
||||
for commit in content:
|
||||
commits += [{"content": commit["commit"]["message"], "path": commit["html_url"]}]
|
||||
if "commit" in commit and "message" in commit["commit"] and "html_url" in commit:
|
||||
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
|
||||
commits_url = response.links.get("next", {}).get("url")
|
||||
|
|
Loading…
Add table
Reference in a new issue