@@ -23,9 +23,8 @@ import (
23
23
24
24
"github.com/golang/protobuf/ptypes"
25
25
"github.com/golang/protobuf/ptypes/timestamp"
26
- "github.com/google/go-github/github"
26
+ "github.com/google/go-github/v48/ github"
27
27
"github.com/gregjones/httpcache"
28
-
29
28
"golang.org/x/build/maintner/maintpb"
30
29
"golang.org/x/oauth2"
31
30
"golang.org/x/sync/errgroup"
@@ -1923,12 +1922,15 @@ func (p *githubRepoPoller) syncCommentsOnIssue(ctx context.Context, issueNum int
1923
1922
owner , repo := p .gr .id .Owner , p .gr .id .Repo
1924
1923
morePages := true // at least try the first. might be empty.
1925
1924
for morePages {
1926
- ics , res , err := p .githubDirect .Issues .ListComments (ctx , owner , repo , int (issueNum ), & github.IssueListCommentsOptions {
1927
- Since : since ,
1928
- Direction : "asc" ,
1929
- Sort : "updated" ,
1925
+ opt := & github.IssueListCommentsOptions {
1926
+ Direction : github .String ("asc" ),
1927
+ Sort : github .String ("updated" ),
1930
1928
ListOptions : github.ListOptions {PerPage : 100 },
1931
- })
1929
+ }
1930
+ if ! since .IsZero () {
1931
+ opt .Since = & since
1932
+ }
1933
+ ics , res , err := p .githubDirect .Issues .ListComments (ctx , owner , repo , int (issueNum ), opt )
1932
1934
if canRetry (ctx , err ) {
1933
1935
continue
1934
1936
} else if ge , ok := err .(* github.ErrorResponse ); ok && (ge .Response .StatusCode == http .StatusNotFound || ge .Response .StatusCode == http .StatusGone ) {
0 commit comments