Monorepo for Tangled tangled.org

appview: adds stars as vanity stats

Signed-off-by: Eduardo Cuducos <4732915+cuducos@users.noreply.github.com>

+8 -1
+3
appview/db/profile.go
··· 450 450 case models.VanityStatRepositoryCount: 451 451 query = `select count(id) from repos where did = ?` 452 452 args = append(args, did) 453 + case models.VanityStatStarCount: 454 + query = `select count(id) from stars where did = ?` 455 + args = append(args, did) 453 456 } 454 457 455 458 var result uint64
+3
appview/models/profile.go
··· 59 59 VanityStatOpenIssueCount VanityStatKind = "open-issue-count" 60 60 VanityStatClosedIssueCount VanityStatKind = "closed-issue-count" 61 61 VanityStatRepositoryCount VanityStatKind = "repository-count" 62 + VanityStatStarCount VanityStatKind = "star-count" 62 63 ) 63 64 64 65 func (v VanityStatKind) String() string { ··· 75 76 return "Closed Issues" 76 77 case VanityStatRepositoryCount: 77 78 return "Repositories" 79 + case VanityStatStarCount: 80 + return "Stars" 78 81 } 79 82 return "" 80 83 }
+2 -1
lexicons/actor/profile.json
··· 45 45 "open-pull-request-count", 46 46 "open-issue-count", 47 47 "closed-issue-count", 48 - "repository-count" 48 + "repository-count", 49 + "star-count" 49 50 ] 50 51 } 51 52 },