10
10
from gitingest .query_parser import parse_remote_repo
11
11
from gitingest .utils .git_utils import validate_github_token
12
12
from gitingest .utils .pattern_utils import process_patterns
13
- from gitingest .utils .s3_utils import generate_s3_file_path , is_s3_enabled , upload_to_s3
14
13
from 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
17
15
from server .server_config import MAX_DISPLAY_SIZE
18
16
from server .server_utils import Colors , log_slider_to_size
19
17
@@ -48,6 +46,11 @@ async def process_query(
48
46
IngestResponse
49
47
A union type, corresponding to IngestErrorResponse or IngestSuccessResponse
50
48
49
+ Raises
50
+ ------
51
+ RuntimeError
52
+ If the commit hash is not found (should never happen).
53
+
51
54
"""
52
55
if token :
53
56
validate_github_token (token )
@@ -75,7 +78,8 @@ async def process_query(
75
78
76
79
# The commit hash should always be available at this point
77
80
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 )
79
83
80
84
try :
81
85
summary , tree , content = ingest_query (query )
@@ -90,7 +94,6 @@ async def process_query(
90
94
source = query .url ,
91
95
user_name = cast ("str" , query .user_name ),
92
96
repo_name = cast ("str" , query .repo_name ),
93
- branch = query .branch ,
94
97
commit = query .commit ,
95
98
include_patterns = query .include_patterns ,
96
99
ignore_patterns = query .ignore_patterns ,
0 commit comments