mirror of
https://github.com/gabrie30/ghorg.git
synced 2026-05-05 20:06:09 +02:00
parent
e5f59fb78c
commit
2ae5eecc1e
@ -90,6 +90,19 @@ func (c Github) GetUserRepos(targetUser string) ([]Repo, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if targetUser == "" {
|
||||
userRepos := []*github.Repository{}
|
||||
|
||||
for _, repo := range repos {
|
||||
if *repo.Owner.Type == "User" {
|
||||
userRepos = append(userRepos, repo)
|
||||
}
|
||||
}
|
||||
|
||||
repos = userRepos
|
||||
}
|
||||
|
||||
allRepos = append(allRepos, repos...)
|
||||
if resp.NextPage == 0 {
|
||||
break
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user