From 6932c7e3e9e9231b8a1bbe8bceeffdc4ece3388d Mon Sep 17 00:00:00 2001 From: Alex Date: Sat, 5 Oct 2024 21:56:47 +0100 Subject: [PATCH] feat: add filename to the top --- application/parser/remote/github_loader.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/parser/remote/github_loader.py b/application/parser/remote/github_loader.py index d35da20d..49f0ae9c 100644 --- a/application/parser/remote/github_loader.py +++ b/application/parser/remote/github_loader.py @@ -21,12 +21,12 @@ class GitHubLoader(BaseRemote): if content.get("encoding") == "base64": try: decoded_content = base64.b64decode(content["content"]).decode("utf-8") - return decoded_content + return f"Filename: {file_path}\n\n{decoded_content}" except Exception as e: print(f"Error decoding content for {file_path}: {e}") raise else: - return content["content"] + return f"Filename: {file_path}\n\n{content['content']}" else: response.raise_for_status()