Skip to content

Commit 2bbe0ef

Browse files
committed
Fix issue template URL format
Use template name without .yml extension in review button URLs. GitHub requires "template=analysis_review" not "template=analysis_review.yml". Add URL-encoded body text with method reference as pre-fill. Fixes template not loading when clicking review buttons.
1 parent 2c0b890 commit 2bbe0ef

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Graph Analysis/unified_analysis.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import argparse
22
import json
33
import os
4+
import urllib.parse
45
from datetime import datetime
56
from itertools import combinations
67
from typing import Any, Dict, Iterable, List, Tuple
@@ -342,7 +343,13 @@ def ensure_iterable_records(data: Any) -> List[Any]:
342343

343344
def _review_button(method_name: str) -> str:
344345
"""Generate HTML for a review button linking to GitHub Issues."""
345-
url = f"https://github.com/SingularityNET-Archive/Graph-Python-scripts/issues/new?template=analysis_review.yml&method={method_name}&file=docs/index.html"
346+
# GitHub uses template name without .yml extension
347+
# Note: GitHub doesn't support pre-filling form fields via URL params,
348+
# but we include method in body text for reference
349+
body_text = f"Method: {method_name}\n\nFile: docs/index.html\n\n"
350+
# URL encode the body text properly
351+
encoded_body = urllib.parse.quote(body_text)
352+
url = f"https://github.com/SingularityNET-Archive/Graph-Python-scripts/issues/new?template=analysis_review&body={encoded_body}"
346353
return f'<a href="{url}" class="review-button" target="_blank">Review This Analysis</a>'
347354

348355

0 commit comments

Comments
 (0)