Skip to content

Commit 586bc1c

Browse files
add GITHUB_TOKEN environment variable also in code
1 parent 611bdff commit 586bc1c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/gitingest/entrypoint.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import asyncio
44
import inspect
5+
import os
56
import shutil
67
from typing import Optional, Set, Tuple, Union
78

@@ -61,6 +62,9 @@ async def ingest_async(
6162
"""
6263
repo_cloned = False
6364

65+
if not token:
66+
token = os.getenv("GITHUB_TOKEN")
67+
6468
try:
6569
query: IngestionQuery = await parse_query(
6670
source=source,

0 commit comments

Comments
 (0)