feat(lored,user): "popular" repositories on user profile
This commit is contained in:
@@ -254,6 +254,24 @@ func prepareUserProfileTabData(ctx *context.Context, profileDbRepo *repo_model.R
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// INFO(contact@guz.one): Popular repositories
|
||||||
|
if count == 0 {
|
||||||
|
repos, count, err = repo_model.SearchRepository(ctx, repo_model.SearchRepoOptions{
|
||||||
|
ListOptions: db.ListOptions{
|
||||||
|
PageSize: 6,
|
||||||
|
Page: 0,
|
||||||
|
},
|
||||||
|
Actor: ctx.Doer,
|
||||||
|
OwnerID: ctx.ContextUser.ID,
|
||||||
|
OrderBy: db.SearchOrderBy(fmt.Sprintf("%s, %s", db.SearchOrderByStarsReverse, db.SearchOrderByRecentUpdated)),
|
||||||
|
Private: ctx.IsSigned,
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
ctx.ServerError("SearchRepository", err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// prepare heatmap data
|
// prepare heatmap data
|
||||||
if setting.Service.EnableUserHeatmap {
|
if setting.Service.EnableUserHeatmap {
|
||||||
data, err := activities_model.GetUserHeatmapDataByUser(ctx, ctx.ContextUser, ctx.Doer)
|
data, err := activities_model.GetUserHeatmapDataByUser(ctx, ctx.ContextUser, ctx.Doer)
|
||||||
|
|||||||
Reference in New Issue
Block a user