1010from gitingest .query_parser import parse_remote_repo
1111from gitingest .utils .git_utils import validate_github_token
1212from gitingest .utils .pattern_utils import process_patterns
13- from gitingest .utils .s3_utils import generate_s3_file_path , is_s3_enabled , upload_to_s3
1413from server .models import IngestErrorResponse , IngestResponse , IngestSuccessResponse , PatternType
15-
16-
14+ from server .s3_utils import generate_s3_file_path , is_s3_enabled , upload_to_s3
1715from server .server_config import MAX_DISPLAY_SIZE
1816from server .server_utils import Colors , log_slider_to_size
1917
@@ -48,6 +46,11 @@ async def process_query(
4846 IngestResponse
4947 A union type, corresponding to IngestErrorResponse or IngestSuccessResponse
5048
49+ Raises
50+ ------
51+ RuntimeError
52+ If the commit hash is not found (should never happen).
53+
5154 """
5255 if token :
5356 validate_github_token (token )
@@ -75,7 +78,8 @@ async def process_query(
7578
7679 # The commit hash should always be available at this point
7780 if not query .commit :
78- raise RuntimeError ("Unexpected error: no commit hash found" )
81+ msg = "Unexpected error: no commit hash found"
82+ raise RuntimeError (msg )
7983
8084 try :
8185 summary , tree , content = ingest_query (query )
@@ -90,7 +94,6 @@ async def process_query(
9094 source = query .url ,
9195 user_name = cast ("str" , query .user_name ),
9296 repo_name = cast ("str" , query .repo_name ),
93- branch = query .branch ,
9497 commit = query .commit ,
9598 include_patterns = query .include_patterns ,
9699 ignore_patterns = query .ignore_patterns ,
0 commit comments