Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -642,7 +642,7 @@ class IssueManager:
|
|
642 |
logger.info(f"Fetching open issues from GitHub API (repo: {self.repo_owner}/{self.repo_name})...")
|
643 |
async with aiohttp.ClientSession(headers=headers) as session:
|
644 |
while True:
|
645 |
-
paginated_url =
|
646 |
logger.debug(f"Fetching URL: {paginated_url}")
|
647 |
# Use a timeout for API requests
|
648 |
try:
|
@@ -797,7 +797,7 @@ class IssueManager:
|
|
797 |
"""Determines issue severity based on labels using predefined rules."""
|
798 |
labels_lower = {label.lower().strip() for label in labels}
|
799 |
for severity, keywords in self.severity_rules.items():
|
800 |
-
if any(keyword in label for
|
801 |
return severity
|
802 |
return "Unknown"
|
803 |
|
@@ -2592,9 +2592,9 @@ def create_ui(manager: IssueManager) -> gr.Blocks:
|
|
2592 |
else:
|
2593 |
logger.warning(f"On-demand file path {file_path_str} resolved outside repo during load for issue {selected_id}.")
|
2594 |
files_content[file_path_str] = f"# File path resolved outside repository: {file_path_str}"
|
2595 |
-
|
2596 |
-
|
2597 |
-
|
2598 |
except Exception as e:
|
2599 |
logger.warning(f"Error reading on-demand file {full_path} for issue {selected_id}: {e}")
|
2600 |
files_content[file_path_str] = f"# Error reading file: {e}"
|
@@ -2854,7 +2854,7 @@ def create_ui(manager: IssueManager) -> gr.Blocks:
|
|
2854 |
issue_list.select(
|
2855 |
fn=handle_issue_select,
|
2856 |
# Pass the event data, which contains the selected row's value (including ID)
|
2857 |
-
inputs=[],
|
2858 |
outputs=[selected_issue_id_hidden, issue_preview_html, code_edit_component, ai_output_display, copy_patch_btn],
|
2859 |
show_progress="minimal",
|
2860 |
# Trigger the JS function to update the tracked issue ID and editor listeners
|
|
|
642 |
logger.info(f"Fetching open issues from GitHub API (repo: {self.repo_owner}/{self.repo_name})...")
|
643 |
async with aiohttp.ClientSession(headers=headers) as session:
|
644 |
while True:
|
645 |
+
paginated_url = api_url
|
646 |
logger.debug(f"Fetching URL: {paginated_url}")
|
647 |
# Use a timeout for API requests
|
648 |
try:
|
|
|
797 |
"""Determines issue severity based on labels using predefined rules."""
|
798 |
labels_lower = {label.lower().strip() for label in labels}
|
799 |
for severity, keywords in self.severity_rules.items():
|
800 |
+
if any(keyword in label for label in labels_lower for keyword in keywords):
|
801 |
return severity
|
802 |
return "Unknown"
|
803 |
|
|
|
2592 |
else:
|
2593 |
logger.warning(f"On-demand file path {file_path_str} resolved outside repo during load for issue {selected_id}.")
|
2594 |
files_content[file_path_str] = f"# File path resolved outside repository: {file_path_str}"
|
2595 |
+
else:
|
2596 |
+
logger.warning(f"On-demand file path {file_path_str} not found or not a file during load for issue {selected_id}.")
|
2597 |
+
files_content[file_path_str] = f"# File not found or not a file: {file_path_str}"
|
2598 |
except Exception as e:
|
2599 |
logger.warning(f"Error reading on-demand file {full_path} for issue {selected_id}: {e}")
|
2600 |
files_content[file_path_str] = f"# Error reading file: {e}"
|
|
|
2854 |
issue_list.select(
|
2855 |
fn=handle_issue_select,
|
2856 |
# Pass the event data, which contains the selected row's value (including ID)
|
2857 |
+
inputs=[gr.SelectData()],
|
2858 |
outputs=[selected_issue_id_hidden, issue_preview_html, code_edit_component, ai_output_display, copy_patch_btn],
|
2859 |
show_progress="minimal",
|
2860 |
# Trigger the JS function to update the tracked issue ID and editor listeners
|