Skip to content

Commit c3e3b26

Browse files
NicolasIRAGNEroot
authored andcommitted
fix: properly use GitPython subcommands
1 parent 75ad044 commit c3e3b26

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

src/gitingest/utils/git_utils.py

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -548,18 +548,20 @@ def _add_token_to_url(url: str, token: str) -> str:
548548
549549
"""
550550
from urllib.parse import urlparse, urlunparse
551-
551+
552552
parsed = urlparse(url)
553553
# Add token as username in URL (GitHub supports this)
554554
netloc = f"x-oauth-basic:{token}@{parsed.hostname}"
555555
if parsed.port:
556556
netloc += f":{parsed.port}"
557-
558-
return urlunparse((
559-
parsed.scheme,
560-
netloc,
561-
parsed.path,
562-
parsed.params,
563-
parsed.query,
564-
parsed.fragment
565-
))
557+
558+
return urlunparse(
559+
(
560+
parsed.scheme,
561+
netloc,
562+
parsed.path,
563+
parsed.params,
564+
parsed.query,
565+
parsed.fragment,
566+
),
567+
)

0 commit comments

Comments
 (0)