File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -103,6 +103,14 @@ def get_report_html(
103103 timestamp_ext = extend_timestamp (timestamp )
104104 score_color : str = get_score_color (f"{ 10 * coverage_metric .coverage :.2f} " ) # scale
105105
106+ # Programmatically construct the full report URL
107+ try :
108+ owner , repo_name = github_repo .split ('/' )
109+ full_report_url = f"https://{ owner } .github.io/{ repo_name } /reports/coverage/htmlcov/index.html"
110+ except ValueError :
111+ # Fallback or default URL in case the repo format is unexpected
112+ full_report_url = "#"
113+
106114 html_content = f"""<!DOCTYPE html>
107115<html lang="en">
108116<head>
@@ -161,7 +169,7 @@ def get_report_html(
161169 <div><strong>Commit:</strong> <a href="https://github.com/{ github_repo } /commit/{ github_sha } "> { github_sha [:7 ]} </a></div>
162170 <div><strong>Repository:</strong> <a href="https://github.com/{ github_repo } ">{ github_repo } </a></div>
163171 <div> </div>
164- <div><strong>Full report:</strong> <a href="https://sandialabs.github.io/rattlesnake-vibration-controller/reports/coverage/htmlcov/index.html ">HTML</a></div>
172+ <div><strong>Full report:</strong> <a href="{ full_report_url } ">HTML</a></div>
165173 </div>
166174 </div>
167175 </div>
You can’t perform that action at this time.
0 commit comments