1
0
mirror of https://codeberg.org/crowci/crow.git synced 2025-08-12 06:02:53 +03:00

Do not list archived repos for all forges (#2374)

Bitbucket seems that does not support repository archiving.

Resolves: https://github.com/woodpecker-ci/woodpecker/issues/2235

---------

Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
This commit is contained in:
Michalis Zampetakis
2023-09-06 22:40:25 +03:00
committed by GitHub
parent 85e157bb10
commit 8a517a8596
3 changed files with 10 additions and 1 deletions

View File

@@ -209,7 +209,12 @@ func (c *client) Repos(ctx context.Context, u *model.User) ([]*model.Repo, error
if err != nil {
return nil, err
}
repos = append(repos, convertRepoList(list)...)
for _, repo := range list {
if repo.GetArchived() {
continue
}
repos = append(repos, convertRepo(repo))
}
opts.Page = resp.NextPage
}
return repos, nil