Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: support commits in trophy case #303

Merged
merged 1 commit into from
Dec 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions docs/snippets/render-trophies.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

from pathlib import Path


_TROPHIES = Path(__file__).parent / "trophies.txt"

_TEMPLATE = """
Expand All @@ -21,7 +20,11 @@
continue

org, rest = trophy.split("/")
repo, _ = rest.split("#")
if "#" in rest:
repo, _ = rest.split("#")
else:
repo, _ = rest.split("@")

# NOTE: We request 40x40 from GitHub, but sometimes it gives us a bigger one.
# Consequently, we also style with `width` to keep things consistent.
print(_TEMPLATE.format(org=org, repo=repo, trophy=trophy))
6 changes: 6 additions & 0 deletions docs/snippets/trophies.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@

ethereum/hevm#615

- ![](https://github.com/girlbossceo.png?size=40){ width="40" loading=lazy align=left } girlbossceo/conduwuit

---

girlbossceo/conduwuit@c6bf8f5ea15a6b963220a1de4bb50a639d0d0696

- ![](https://github.com/hugovk.png?size=40){ width="40" loading=lazy align=left } hugovk/em-keyboard

---
Expand Down
8 changes: 5 additions & 3 deletions docs/snippets/trophies.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
# one per line, order is not important
# trophies MUST be formatted as owner/repo#number,
# where owner/repo is the GitHub repo slug and
# number is the issue/PR that introduces or uses zizmor

# two formats are supported:
# owner/repo#number for PRs
# owner/repo@commit for individual commits

adafruit/circuitpython#9785
astral-sh/ruff#14844
astropy/astropy#17315
cakephp/cakephp#18081
girlbossceo/conduwuit@c6bf8f5ea15a6b963220a1de4bb50a639d0d0696
danmar/cppcheck#7044
DataDog/datadog-agent#30871
Diaoul/subliminal#1190
Expand Down
Loading