Skip to content

Commit e3a658d

Browse files
committed
Update review button with tooltip and improved comments
Add tooltip to guide users if template doesn't load automatically. Update comments to clarify GitHub Issue Forms template loading behavior. Improve body text formatting with markdown. If template parameter doesn't work, users can select from template chooser.
1 parent 8b69959 commit e3a658d

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

Graph Analysis/unified_analysis.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -343,15 +343,19 @@ def ensure_iterable_records(data: Any) -> List[Any]:
343343

344344
def _review_button(method_name: str) -> str:
345345
"""Generate HTML for a review button linking to GitHub Issues."""
346-
# GitHub Issue Forms: use template name WITHOUT .yml extension
347-
# The template parameter should load the form template
348-
# Note: If config.yml exists, GitHub may show template chooser first
346+
# GitHub Issue Forms: link to issues/new page
347+
# If template parameter works, it will load automatically
348+
# Otherwise, users will see template chooser and can select "Analysis Review"
349+
# Include method info in body as pre-fill for reference
349350
body_text = f"**Method:** {method_name}\n\n**File:** docs/index.html\n\n---\n\n"
350351
# URL encode the body text properly
351352
encoded_body = urllib.parse.quote(body_text)
352-
# Template name without extension - GitHub's standard format
353+
354+
# Use template parameter (GitHub's documented format for Issue Forms)
355+
# Template name without .yml extension
353356
url = f"https://github.com/SingularityNET-Archive/Graph-Python-scripts/issues/new?template=analysis_review&body={encoded_body}"
354-
return f'<a href="{url}" class="review-button" target="_blank">Review This Analysis</a>'
357+
358+
return f'<a href="{url}" class="review-button" target="_blank" title="Opens GitHub Issue template. If template doesn\'t load automatically, select \'Analysis Review\' from the template chooser.">Review This Analysis</a>'
355359

356360

357361
def write_html_report(

0 commit comments

Comments
 (0)