codelion commited on
Commit
04a617c
·
verified ·
1 Parent(s): 17b3d61

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
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"https://github.com/{owner}/{repo_name}"
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}")