Opening it as draft because I am a noob on Nix and couldn't test it locally yet. But opening a PR to share progress, and open room for advice one what might be better : )
+3
appview/db/profile.go
+3
appview/db/profile.go
···
420
420
case models.VanityStatRepositoryCount:
421
421
query = `select count(id) from repos where did = ?`
422
422
args = append(args, did)
423
+
case models.VanityStatStarCount:
424
+
query = `select count(id) from stars where did = ?`
425
+
args = append(args, did)
423
426
}
424
427
425
428
var result uint64
+3
appview/models/profile.go
+3
appview/models/profile.go
···
58
58
VanityStatOpenIssueCount VanityStatKind = "open-issue-count"
59
59
VanityStatClosedIssueCount VanityStatKind = "closed-issue-count"
60
60
VanityStatRepositoryCount VanityStatKind = "repository-count"
61
+
VanityStatStarCount VanityStatKind = "star-count"
61
62
)
62
63
63
64
func (v VanityStatKind) String() string {
···
74
75
return "Closed Issues"
75
76
case VanityStatRepositoryCount:
76
77
return "Repositories"
78
+
case VanityStatStarCount:
79
+
return "Stars"
77
80
}
78
81
return ""
79
82
}