Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -18,8 +18,10 @@ PROGRESS_STEPS = [
|
|
| 18 |
]
|
| 19 |
|
| 20 |
def analyze_github_repo(repo_input, github_token=None):
|
|
|
|
| 21 |
if github_token:
|
| 22 |
os.environ["GITHUB_TOKEN"] = github_token
|
|
|
|
| 23 |
|
| 24 |
github_token = os.environ.get("GITHUB_TOKEN")
|
| 25 |
if not github_token:
|
|
@@ -39,7 +41,7 @@ def analyze_github_repo(repo_input, github_token=None):
|
|
| 39 |
|
| 40 |
try:
|
| 41 |
owner, repo_name = get_repo_info(repo_input)
|
| 42 |
-
repo_url = f"
|
| 43 |
|
| 44 |
g = Github(github_token)
|
| 45 |
github_repo = g.get_repo(f"{owner}/{repo_name}")
|
|
|
|
| 18 |
]
|
| 19 |
|
| 20 |
def analyze_github_repo(repo_input, github_token=None):
|
| 21 |
+
base_url = "https://github.com/"
|
| 22 |
if github_token:
|
| 23 |
os.environ["GITHUB_TOKEN"] = github_token
|
| 24 |
+
base_url = f"https://{github_token}@github.com/"
|
| 25 |
|
| 26 |
github_token = os.environ.get("GITHUB_TOKEN")
|
| 27 |
if not github_token:
|
|
|
|
| 41 |
|
| 42 |
try:
|
| 43 |
owner, repo_name = get_repo_info(repo_input)
|
| 44 |
+
repo_url = f"{base_url}/{owner}/{repo_name}"
|
| 45 |
|
| 46 |
g = Github(github_token)
|
| 47 |
github_repo = g.get_repo(f"{owner}/{repo_name}")
|