Skip to content

Commit 09ebc57

Browse files
committed
fix: links in repo tables
1 parent e723ee4 commit 09ebc57

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

.github/scripts/update_suite_table.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@ def get_space(suite_dir: Path) -> str:
9191

9292

9393
def build_table(repo_root: Path, parent: str) -> str:
94-
has_repo_link = parent in ("examples", "labs")
94+
repo_link_parents = {"examples", "labs"}
95+
has_repo_link = parent in repo_link_parents
9596
header = "| Robot Framework Suite | Description |" + (" Repository Link |" if has_repo_link else "")
9697
sep = "|---|---|" + ("---|" if has_repo_link else "")
9798
rows = []
@@ -105,7 +106,8 @@ def build_table(repo_root: Path, parent: str) -> str:
105106
rel = f"{parent}/{name}"
106107
repo_col = ""
107108
if has_repo_link:
108-
repo_col = f" [try out](https://github.com/robotmk/example-{name}) |"
109+
repo_prefix = f"{parent[:-1]}-" if parent.endswith("s") else f"{parent}-"
110+
repo_col = f" [try out](https://github.com/robotmk/{repo_prefix}{name}) |"
109111
rows.append(f"| [{name}]({rel}) | {doc} |{repo_col}")
110112
return "\n".join([header, sep] + rows)
111113

0 commit comments

Comments
 (0)