From 514a9efe107abbc9add00b72a55f8703264b2855 Mon Sep 17 00:00:00 2001 From: Eduardo Cuducos <4732915+cuducos@users.noreply.github.com> Date: Mon, 5 Jan 2026 09:27:35 -0500 Subject: [PATCH] appview: adds stars as vanity stats Signed-off-by: Eduardo Cuducos <4732915+cuducos@users.noreply.github.com> --- appview/db/profile.go | 3 +++ appview/models/profile.go | 3 +++ lexicons/actor/profile.json | 3 ++- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/appview/db/profile.go b/appview/db/profile.go index 745b7969..f90c1e36 100644 --- a/appview/db/profile.go +++ b/appview/db/profile.go @@ -420,6 +420,9 @@ func GetVanityStat(e Execer, did string, stat models.VanityStatKind) (uint64, er case models.VanityStatRepositoryCount: query = `select count(id) from repos where did = ?` args = append(args, did) + case models.VanityStatStarCount: + query = `select count(id) from stars where did = ?` + args = append(args, did) } var result uint64 diff --git a/appview/models/profile.go b/appview/models/profile.go index 193ce448..7a5b063c 100644 --- a/appview/models/profile.go +++ b/appview/models/profile.go @@ -58,6 +58,7 @@ const ( VanityStatOpenIssueCount VanityStatKind = "open-issue-count" VanityStatClosedIssueCount VanityStatKind = "closed-issue-count" VanityStatRepositoryCount VanityStatKind = "repository-count" + VanityStatStarCount VanityStatKind = "star-count" ) func (v VanityStatKind) String() string { @@ -74,6 +75,8 @@ func (v VanityStatKind) String() string { return "Closed Issues" case VanityStatRepositoryCount: return "Repositories" + case VanityStatStarCount: + return "Stars" } return "" } diff --git a/lexicons/actor/profile.json b/lexicons/actor/profile.json index fdd43674..3dc85cce 100644 --- a/lexicons/actor/profile.json +++ b/lexicons/actor/profile.json @@ -41,7 +41,8 @@ "open-pull-request-count", "open-issue-count", "closed-issue-count", - "repository-count" + "repository-count", + "star-count" ] } }, -- 2.43.0