mirror of
https://github.com/onepanelio/onepanel.git
synced 2025-09-29 19:12:08 +08:00
fix contributor sorting
This commit is contained in:
@@ -147,10 +147,10 @@ func printMarkDown(issues []*issue, version *string) {
|
|||||||
|
|
||||||
fmt.Println("# Contributors")
|
fmt.Println("# Contributors")
|
||||||
usernames := make([]string, 0)
|
usernames := make([]string, 0)
|
||||||
for username := range contributors {
|
for _, contributor := range contributors {
|
||||||
usernames = append(usernames, username)
|
usernames = append(usernames, contributor.Login)
|
||||||
}
|
}
|
||||||
sort.Strings(usernames)
|
sort.Slice(usernames, func(i, j int) bool { return strings.ToLower(usernames[i]) < strings.ToLower(usernames[j]) })
|
||||||
for _, username := range usernames {
|
for _, username := range usernames {
|
||||||
user := contributors[username]
|
user := contributors[username]
|
||||||
fmt.Println(fmt.Sprintf("- <a href=\"%s\"><img src=\"%s\" width=\"12\"/> <strong>%s</strong></a> %s", user.URL, user.AvatarURL, user.Login, user.Login))
|
fmt.Println(fmt.Sprintf("- <a href=\"%s\"><img src=\"%s\" width=\"12\"/> <strong>%s</strong></a> %s", user.URL, user.AvatarURL, user.Login, user.Login))
|
||||||
|
Reference in New Issue
Block a user