Aiswarya Sankar commited on
Commit
bb4f5a4
·
1 Parent(s): 0ff1024

Refactor stuff

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -266,7 +266,7 @@ def fetchGithubIssues(**kwargs) -> Response:
266
  """
267
  This endpoint should get a list of all the github issues that are open for this repository
268
  """
269
- repo = repo_name.value
270
  print("REPO NAME IN FETCH GITHUB ISSUES: " + str(repo))
271
  batch = []
272
  all_issues = []
@@ -283,7 +283,8 @@ def fetchGithubIssues(**kwargs) -> Response:
283
  # Query with state=all to get both open and closed issues
284
  query = f"issues?page={page}&per_page={per_page}&state=all"
285
  issues = requests.get(f"{base_url}/{repo}/{query}", headers=headers)
286
- print("Issues: " + issues)
 
287
  batch.extend(issues.json())
288
  for issue in issues.json():
289
  issues_data.append({
@@ -297,6 +298,9 @@ def fetchGithubIssues(**kwargs) -> Response:
297
  git_tickets.value = issues_data
298
  git_ticket_choices.value = {git_tickets.value["title"]: ticket for ticket in tickets}
299
  git_titles.value = [git_tickets.value["title"] for ticket in tickets]
 
 
 
300
  return issues_data
301
 
302
 
 
266
  """
267
  This endpoint should get a list of all the github issues that are open for this repository
268
  """
269
+ repo = repo_name.value[:-4]
270
  print("REPO NAME IN FETCH GITHUB ISSUES: " + str(repo))
271
  batch = []
272
  all_issues = []
 
283
  # Query with state=all to get both open and closed issues
284
  query = f"issues?page={page}&per_page={per_page}&state=all"
285
  issues = requests.get(f"{base_url}/{repo}/{query}", headers=headers)
286
+ print("Issues: " + str(issues))
287
+
288
  batch.extend(issues.json())
289
  for issue in issues.json():
290
  issues_data.append({
 
298
  git_tickets.value = issues_data
299
  git_ticket_choices.value = {git_tickets.value["title"]: ticket for ticket in tickets}
300
  git_titles.value = [git_tickets.value["title"] for ticket in tickets]
301
+ print("git_tickets: " + str(git_tickets.value))
302
+ print("git_choices: " + str(git_ticket_choices.value))
303
+ print("git_titles: " + str(git_titles.value))
304
  return issues_data
305
 
306