Skip to content

Commit 416254c

Browse files
rebase
1 parent 6eb0e7b commit 416254c

File tree

5 files changed

+107
-230
lines changed

5 files changed

+107
-230
lines changed

src/gitingest/utils/logging_config.py

Lines changed: 0 additions & 111 deletions
This file was deleted.

src/server/query_processor.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,8 @@
1010
from gitingest.query_parser import parse_remote_repo
1111
from gitingest.utils.git_utils import validate_github_token
1212
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
1413
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
1715
from server.server_config import MAX_DISPLAY_SIZE
1816
from 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,

src/server/routers/ingest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
from prometheus_client import Counter
99

1010
from gitingest.config import TMP_BASE_PATH
11-
from gitingest.utils.s3_utils import get_s3_url_for_ingest_id, is_s3_enabled
1211
from server.models import IngestRequest
1312
from server.routers_utils import COMMON_INGEST_RESPONSES, _perform_ingestion
13+
from server.s3_utils import get_s3_url_for_ingest_id, is_s3_enabled
1414
from server.server_config import MAX_DISPLAY_SIZE
1515
from server.server_utils import limiter
1616

0 commit comments

Comments
 (0)