Showcase links prefer repo Website setting; fix star count field
A private starred repo used to link visitors straight to a 404. The link now uses the repo's Website setting when set, falls back to the repo url only for public repos, and renders private repos without a website as unlinked cards. Also: Gitea serializes the star count as stars_count, not GitHub's stargazers_count - the stars chip had been silently null and dropped. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
9dbd30655f
commit
9b7162f2ca
+11
-2
@@ -23,9 +23,18 @@ alternatives:
|
||||
kind: gitea_starred
|
||||
username: bl
|
||||
public: true
|
||||
# The link prefers the repo's Website setting so private
|
||||
# repos can point at something the public can actually
|
||||
# open; a private repo with no website gets no link at all
|
||||
# (the card renders an unlinked heading) instead of a 404.
|
||||
# Gitea calls the star count stars_count, not GitHub's
|
||||
# stargazers_count.
|
||||
jq: >
|
||||
.[] | {name: .name, description: .description, url: .html_url,
|
||||
stars: .stargazers_count}
|
||||
.[] | {name: .name, description: .description,
|
||||
stars: .stars_count,
|
||||
url: (if .website != null and .website != "" then .website
|
||||
elif .private then null
|
||||
else .html_url end)}
|
||||
- name: Your brief
|
||||
description: >
|
||||
A few lines are enough to begin a conversation — we need a
|
||||
|
||||
Reference in New Issue
Block a user