@@ -535,9 +535,9 @@ func (g *GithubDownloaderV3) getComments(issueNumber int64) ([]*base.Comment, er
535
535
}
536
536
537
537
// GetAllComments returns repository comments according page and perPageSize
538
- func (g * GithubDownloaderV3 ) GetAllComments (page , perPageSize int ) ([]* base.Comment , bool , error ) {
538
+ func (g * GithubDownloaderV3 ) GetAllComments (page , perPage int ) ([]* base.Comment , bool , error ) {
539
539
var (
540
- allComments = make ([]* base.Comment , 0 , perPageSize )
540
+ allComments = make ([]* base.Comment , 0 , perPage )
541
541
created = "created"
542
542
asc = "asc"
543
543
)
@@ -546,7 +546,7 @@ func (g *GithubDownloaderV3) GetAllComments(page, perPageSize int) ([]*base.Comm
546
546
Direction : & asc ,
547
547
ListOptions : github.ListOptions {
548
548
Page : page ,
549
- PerPage : perPageSize ,
549
+ PerPage : perPage ,
550
550
},
551
551
}
552
552
@@ -555,6 +555,7 @@ func (g *GithubDownloaderV3) GetAllComments(page, perPageSize int) ([]*base.Comm
555
555
if err != nil {
556
556
return nil , false , fmt .Errorf ("error while listing repos: %v" , err )
557
557
}
558
+ log .Trace ("Request get comments %d/%d, but in fact get %d" , perPage , page , len (comments ))
558
559
g .rate = & resp .Rate
559
560
for _ , comment := range comments {
560
561
var email string
@@ -599,7 +600,7 @@ func (g *GithubDownloaderV3) GetAllComments(page, perPageSize int) ([]*base.Comm
599
600
})
600
601
}
601
602
602
- return allComments , len (allComments ) < perPageSize , nil
603
+ return allComments , len (allComments ) < perPage , nil
603
604
}
604
605
605
606
// GetPullRequests returns pull requests according page and perPage
@@ -622,6 +623,7 @@ func (g *GithubDownloaderV3) GetPullRequests(page, perPage int) ([]*base.PullReq
622
623
if err != nil {
623
624
return nil , false , fmt .Errorf ("error while listing repos: %v" , err )
624
625
}
626
+ log .Trace ("Request get pull requests %d/%d, but in fact get %d" , perPage , page , len (prs ))
625
627
g .rate = & resp .Rate
626
628
for _ , pr := range prs {
627
629
var body string
0 commit comments