forked from tangled.org/core
this repo has no description

appview: tweak trending algo a bit

sort by most gained stars.

Signed-off-by: oppiliappan <me@oppi.li>

oppi.li e15ed001 8dae47cf

verified
Changed files
+3 -2
appview
db
+3 -2
appview/db/star.go
··· 257 257 repo_star_counts as ( 258 258 select 259 259 s.repo_at, 260 - count(*) as star_count 260 + count(*) as stars_gained_last_week 261 261 from stars s 262 262 join recent_starred_repos rsr on s.repo_at = rsr.repo_at 263 + where s.created >= datetime('now', '-7 days') 263 264 group by s.repo_at 264 265 ) 265 266 select rsc.repo_at 266 267 from repo_star_counts rsc 267 - order by rsc.star_count desc 268 + order by rsc.stars_gained_last_week desc 268 269 limit 8 269 270 ` 270 271