fix: gitea api pagination

This commit is contained in:
Simon Cornet 2026-01-20 15:23:16 +01:00
commit 67f3758f7a

View file

@ -7,6 +7,7 @@ import (
"net/http"
"net/url"
"strconv"
"strings"
"time"
"github.com/scornet256/go-logger"
@ -135,7 +136,7 @@ func (c *GiteaClient) fetchRepositoryPage(ctx context.Context, options GiteaAPIO
}
// check for more pages
hasMore := len(giteaRepos) == options.Limit
hasMore := strings.Contains(resp.Header.Get("Link"), `rel="next"`)
return giteaRepos, hasMore, nil
}