Skip to content

Commit 2e9ca8a

Browse files
fix
1 parent 9050ca5 commit 2e9ca8a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/gitingest/query_parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ async def try_domains_for_user_and_repo(user_name: str, repo_name: str, token: s
313313
"""
314314
for domain in KNOWN_GIT_HOSTS:
315315
candidate = f"https://{domain}/{user_name}/{repo_name}"
316-
if await check_repo_exists(candidate, token=token if domain == "github.com" else None):
316+
if await check_repo_exists(candidate, token=token if domain.startswith("github.") else None):
317317
return domain
318318

319319
msg = f"Could not find a valid repository host for '{user_name}/{repo_name}'."

src/gitingest/utils/git_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ async def check_repo_exists(url: str, token: str | None = None) -> bool:
124124
# Public GitHub vs. GitHub Enterprise
125125
base_api = "https://api.github.com" if host == "github.com" else f"https://{host}/api/v3"
126126
url = f"{base_api}/repos/{owner}/{repo}"
127-
cmd += ["-H", "Accept: application/vnd.github+json", "-H", f"Authorization: Bearer {token}"]
127+
cmd += [f"Authorization: Bearer {token}"]
128128

129129
cmd.append(url)
130130

0 commit comments

Comments
 (0)