fix: gitea api pagination
This commit is contained in:
parent
4bca796b43
commit
67f3758f7a
1 changed files with 2 additions and 1 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue