Skip to content

Commit 2f113fe

Browse files
committed
docs: support commits in trophy case
Fixes #302.
1 parent 1110d97 commit 2f113fe

File tree

3 files changed

+16
-5
lines changed

3 files changed

+16
-5
lines changed

Diff for: docs/snippets/render-trophies.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66
from pathlib import Path
77

8-
98
_TROPHIES = Path(__file__).parent / "trophies.txt"
109

1110
_TEMPLATE = """
@@ -21,7 +20,11 @@
2120
continue
2221

2322
org, rest = trophy.split("/")
24-
repo, _ = rest.split("#")
23+
if "#" in rest:
24+
repo, _ = rest.split("#")
25+
else:
26+
repo, _ = rest.split("@")
27+
2528
# NOTE: We request 40x40 from GitHub, but sometimes it gives us a bigger one.
2629
# Consequently, we also style with `width` to keep things consistent.
2730
print(_TEMPLATE.format(org=org, repo=repo, trophy=trophy))

Diff for: docs/snippets/trophies.md

+6
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,12 @@
7171

7272
ethereum/hevm#615
7373

74+
- ![](https://github.com/girlbossceo.png?size=40){ width="40" loading=lazy align=left } girlbossceo/conduwuit
75+
76+
---
77+
78+
girlbossceo/conduwuit@c6bf8f5ea15a6b963220a1de4bb50a639d0d0696
79+
7480
- ![](https://github.com/hugovk.png?size=40){ width="40" loading=lazy align=left } hugovk/em-keyboard
7581

7682
---

Diff for: docs/snippets/trophies.txt

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
# one per line, order is not important
2-
# trophies MUST be formatted as owner/repo#number,
3-
# where owner/repo is the GitHub repo slug and
4-
# number is the issue/PR that introduces or uses zizmor
2+
3+
# two formats are supported:
4+
# owner/repo#number for PRs
5+
# owner/repo@commit for individual commits
56

67
adafruit/circuitpython#9785
78
astral-sh/ruff#14844
89
astropy/astropy#17315
910
cakephp/cakephp#18081
11+
girlbossceo/conduwuit@c6bf8f5ea15a6b963220a1de4bb50a639d0d0696
1012
danmar/cppcheck#7044
1113
DataDog/datadog-agent#30871
1214
Diaoul/subliminal#1190

0 commit comments

Comments
 (0)