diff --git a/appview/db/profile.go b/appview/db/profile.go index 49b1cc75..9853c51b 100644 --- a/appview/db/profile.go +++ b/appview/db/profile.go @@ -450,6 +450,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 291d8b2e..86285ae9 100644 --- a/appview/models/profile.go +++ b/appview/models/profile.go @@ -59,6 +59,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 { @@ -75,6 +76,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 fd36641f..d7127214 100644 --- a/lexicons/actor/profile.json +++ b/lexicons/actor/profile.json @@ -45,7 +45,8 @@ "open-pull-request-count", "open-issue-count", "closed-issue-count", - "repository-count" + "repository-count", + "star-count" ] } },