diff --git a/.github/prtester.py b/.github/prtester.py index 8938923a..33aec718 100644 --- a/.github/prtester.py +++ b/.github/prtester.py @@ -4,7 +4,8 @@ import re from bs4 import BeautifulSoup from datetime import datetime from typing import Iterable -import os.path +#import os.path +import os import urllib # This script is specifically written to be used in automation for https://github.com/RSS-Bridge/rss-bridge @@ -39,7 +40,8 @@ def main(instances: Iterable[Instance], with_upload: bool, with_reduced_upload: def testBridges(instance: Instance, bridge_cards: Iterable, with_upload: bool, with_reduced_upload: bool) -> Iterable: instance_suffix = '' - tester_url = 'https://bockiii.github.io/prs/' + prid = os.environ.get("PR") + tester_url = f'https://bockiii.github.io/prs/{prid}/' if instance.name: instance_suffix = f' ({instance.name})' table_rows = [] @@ -144,7 +146,7 @@ def testBridges(instance: Instance, bridge_cards: Iterable, with_upload: bool, w filename = f'{os.getcwd()}/{instance.name}_{form_number}.html' with open(file=filename, mode='wb') as file: file.write(page_text) - table_rows.append(f'| {bridge_name} | [{form_number} {context_name}{instance_suffix}]({tester_url}) | {status} |') + table_rows.append(f'| {bridge_name} | [{form_number} {context_name}{instance_suffix}]({tester_url}/{filename}) | {status} |') form_number += 1 return table_rows