This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

appview: sort github repos by star count & last pushed date

Signed-off-by: Seongmin Lee <git@boltless.me>

author
Seongmin Lee
date (Jul 23, 2026, 8:56 PM +0900) commit 9b9a2aeb parent b894cba2 change-id uqrymoyk
+33 -11
+23 -10
appview/accountmigration/accountmigration.go
··· 9 9 "slices" 10 10 "strconv" 11 11 "strings" 12 + "time" 12 13 13 14 "github.com/bluesky-social/indigo/atproto/syntax" 14 15 "github.com/go-chi/chi/v5" ··· 101 102 } 102 103 103 104 type githubUserRepo struct { 104 - Name string `json:"name"` 105 - CloneUrl string `json:"clone_url"` 106 - DefaultBranch string `json:"default_branch"` 107 - Description string `json:"description"` 108 - Homepage string `json:"homepage"` 109 - Topics []string `json:"topics"` 110 - Fork bool `json:"fork"` 111 - Private bool `json:"private"` 112 - Archived bool `json:"archived"` 113 - Disabled bool `json:"disabled"` 105 + Name string `json:"name"` 106 + CloneUrl string `json:"clone_url"` 107 + Stars int `json:"stargazers_count"` 108 + PushedAt time.Time `json:"pushed_at"` 109 + DefaultBranch string `json:"default_branch"` 110 + Description string `json:"description"` 111 + Homepage string `json:"homepage"` 112 + Topics []string `json:"topics"` 113 + Fork bool `json:"fork"` 114 + Private bool `json:"private"` 115 + Archived bool `json:"archived"` 116 + Disabled bool `json:"disabled"` 114 117 } 115 118 116 119 func (s *AccountMigration) listGitHubRepos(w http.ResponseWriter, r *http.Request) { ··· 180 183 Description: ghrepo.Description, 181 184 Website: ghrepo.Homepage, 182 185 Topics: ghrepo.Topics, 186 + Stars: ghrepo.Stars, 187 + PushedAt: ghrepo.PushedAt, 183 188 Selected: !migrated, 184 189 }) 185 190 } 191 + 192 + // sort by stars desc, then most recently pushed 193 + slices.SortFunc(importRepos, func(a, b pages.RepoImportParams) int { 194 + if a.Stars != b.Stars { 195 + return b.Stars - a.Stars 196 + } 197 + return b.PushedAt.Compare(a.PushedAt) 198 + }) 186 199 187 200 if err := s.pages.AccountMigrateRepoListFragment(w, pages.AccountMigrateRepoListParams{ 188 201 Repos: importRepos,
+4 -1
appview/pages/pages.go
··· 2076 2076 Website string 2077 2077 Topics []string 2078 2078 2079 - Selected bool 2079 + // metadata used on bulk-import view 2080 + Stars int 2081 + PushedAt time.Time // last push; used for sorting, not rendered yet 2082 + Selected bool // repos that has been already migrateded will be deselected 2080 2083 } 2081 2084 2082 2085 func (p *Pages) AccountMigrateFromGitHub(w io.Writer, params AccountMigrateFromGitHubParams) error {
+6
appview/pages/templates/account/migrate/fragments/repoList.html
··· 14 14 <input type="checkbox" id="selected_{{ $i }}" name="selected_{{ $i }}" value="1" {{ if $repo.Selected }}checked{{ end }} class="shrink-0" /> 15 15 <span class="min-w-0 truncate">{{ $repo.Name }}</span> 16 16 </label> 17 + {{ if gt .Stars 0 }} 18 + <div class="flex items-center gap-1"> 19 + {{ i "star" "size-3 fill-current" }} 20 + <span class="text-sm">{{ scaleFmt .Stars }}</span> 21 + </div> 22 + {{ end }} 17 23 </div> 18 24 19 25 <div class="flex items-center gap-2 shrink-0">