#8. return all page

This commit is contained in:
Gorbunov Kirill Andreevich 2024-03-31 16:47:58 +03:00
parent 2fe3898756
commit 6a6829e82e

View File

@ -143,7 +143,7 @@ func (g *Gitea) RequestOpen(ctx context.Context, branch string, path string, mod
logger.Error(ctx, fmt.Sprintf("GetPulls error: %s", err))
return err
}
logger.Info(ctx, "len: ", len(pulls))
for _, pull := range pulls {
logger.Debugf(ctx, fmt.Sprintf("PULL title - %s | ref - %s", pull.Title, pull.Base.Ref))
if strings.Contains(pull.Title, path) && strings.Contains(pull.Base.Ref, branch) {
@ -410,7 +410,7 @@ func GetPulls(ctx context.Context, url, owner, repo, token string) ([]*giteaPull
req, err := http.NewRequestWithContext(
ctx,
http.MethodGet,
fmt.Sprintf("https://%s/api/v1//repos/%s/%s/pulls?state=open&token=%s", url, owner, repo, token),
fmt.Sprintf("https://%s/api/v1//repos/%s/%s/pulls?state=open&page=99&token=%s", url, owner, repo, token),
nil)
if err != nil {
return nil, err