@@ -502,6 +502,8 @@ func (g *GithubDownloaderV3) GetAllComments(page, perPage int) ([]*base.Comment,
502
502
return g .getAllCommentsSince (page , perPage , nil )
503
503
}
504
504
505
+ // GetAllCommentsSince returns repository comments since a time.
506
+ // If since is nil, it will return all comments.
505
507
func (g * GithubDownloaderV3 ) getAllCommentsSince (page , perPage int , since * time.Time ) ([]* base.Comment , bool , error ) {
506
508
var (
507
509
allComments = make ([]* base.Comment , 0 , perPage )
@@ -579,7 +581,8 @@ func (g *GithubDownloaderV3) GetPullRequests(page, perPage int) ([]*base.PullReq
579
581
return g .GetNewPullRequests (page , perPage , time.Time {})
580
582
}
581
583
582
- func convertGithubReview (r * github.PullRequestReview ) * base.Review {
584
+ // convertGithubReview converts github review to Gitea review
585
+ func (g * GithubDownloaderV3 ) convertGithubReview (r * github.PullRequestReview ) * base.Review {
583
586
return & base.Review {
584
587
ID : r .GetID (),
585
588
ReviewerID : r .GetUser ().GetID (),
@@ -655,7 +658,7 @@ func (g *GithubDownloaderV3) GetReviews(reviewable base.Reviewable) ([]*base.Rev
655
658
}
656
659
g .setRate (& resp .Rate )
657
660
for _ , review := range reviews {
658
- r := convertGithubReview (review )
661
+ r := g . convertGithubReview (review )
659
662
r .IssueIndex = reviewable .GetLocalIndex ()
660
663
// retrieve all review comments
661
664
opt2 := & github.ListOptions {
@@ -717,7 +720,8 @@ func (g *GithubDownloaderV3) GetNewIssues(page, perPage int, updatedAfter time.T
717
720
return g .getIssuesSince (page , perPage , updatedAfter )
718
721
}
719
722
720
- // getIssuesSince returns issues given page, perPage and since
723
+ // getIssuesSince returns issues given page, perPage and since.
724
+ // when since is empty, it will return all issues
721
725
func (g * GithubDownloaderV3 ) getIssuesSince (page , perPage int , since time.Time ) ([]* base.Issue , bool , error ) {
722
726
if perPage > g .maxPerPage {
723
727
perPage = g .maxPerPage
@@ -899,6 +903,7 @@ func (g *GithubDownloaderV3) convertGithubPullRequest(pr *github.PullRequest, pe
899
903
}, nil
900
904
}
901
905
906
+ // getIssueReactions returns reactions using Github API
902
907
func (g * GithubDownloaderV3 ) getIssueReactions (number , perPage int ) ([]* base.Reaction , error ) {
903
908
var reactions []* base.Reaction
904
909
if ! g .SkipReactions {
0 commit comments