Skip to content

Commit 7b89b74

Browse files
committed
extend the template scope
1 parent 8fd2af1 commit 7b89b74

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/gardenlinux/features/reproducibility/markdown_formatter.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ class MarkdownFormatter(object):
4242

4343
_DROPDOWN_THRESHOLD = 10
4444

45-
_nighly_url_template = Template(
46-
"https://github.com/gardenlinux/gardenlinux/actions/runs/$id"
45+
_nightly_template = Template(
46+
"**[#$run_number](https://github.com/gardenlinux/gardenlinux/actions/runs/$id)**"
4747
)
4848

4949
def __init__(
@@ -152,14 +152,14 @@ def _format_nighlty_stats(self) -> str:
152152
Nightly(*n.split(",")) for n in f.read().rstrip().split("\n")
153153
)
154154
if nightly_a.run_number != "":
155-
result += f"\n\nComparison of nightly **[#{nightly_a.run_number}]({self._nighly_url_template.substitute(id=nightly_a.id)})** \
156-
and **[#{nightly_b.run_number}]({self._nighly_url_template.substitute(id=nightly_b.id)})**"
155+
result += f"\n\nComparison of nightly {self._nightly_template.substitute(run_number=nightly_a.run_number, id=nightly_a.id)} \
156+
and {self._nightly_template.substitute(run_number=nightly_b.run_number, id=nightly_b.id)}"
157157
if nightly_a.commit != nightly_b.commit:
158158
result += f"\n\n⚠️ The nightlies used different commits: `{nightly_a.commit[:7]}` (#{nightly_a.run_number}) != `{nightly_b.commit[:7]}` (#{nightly_b.run_number})"
159159
if nightly_a.run_number == nightly_b.run_number:
160-
result += f"\n\n⚠️ Comparing the nightly **[#{nightly_a.run_number}]({self._nighly_url_template.substitute(id=nightly_a.id)})** to itself can not reveal any issues"
160+
result += f"\n\n⚠️ Comparing the nightly {self._nightly_template.substitute(run_number=nightly_a.run_number, id=nightly_a.id)} to itself can not reveal any issues"
161161
else:
162-
result += f"\n\nComparison of the latest nightly **[#{nightly_b.run_number}]({self._nighly_url_template.substitute(id=nightly_b.id)})** \
162+
result += f"\n\nComparison of the latest nightly {self._nightly_template.substitute(run_number=nightly_b.run_number, id=nightly_b.id)} \
163163
with a new build"
164164
if nightly_a.commit != nightly_b.commit:
165165
result += f"\n\n⚠️ The build used different commits: `{nightly_b.commit[:7]}` (#{nightly_b.run_number}) != `{nightly_a.commit[:7]}` (new build)"

0 commit comments

Comments
 (0)