@@ -681,6 +681,9 @@ func Test_ListIssues(t *testing.T) {
681
681
{"name" : "bug" , "id" : "label1" , "description" : "Bug label" },
682
682
},
683
683
},
684
+ "comments" : map [string ]any {
685
+ "totalCount" : 5 ,
686
+ },
684
687
},
685
688
{
686
689
"number" : 456 ,
@@ -696,6 +699,9 @@ func Test_ListIssues(t *testing.T) {
696
699
{"name" : "enhancement" , "id" : "label2" , "description" : "Enhancement label" },
697
700
},
698
701
},
702
+ "comments" : map [string ]any {
703
+ "totalCount" : 3 ,
704
+ },
699
705
},
700
706
}
701
707
@@ -713,6 +719,9 @@ func Test_ListIssues(t *testing.T) {
713
719
"labels" : map [string ]any {
714
720
"nodes" : []map [string ]any {},
715
721
},
722
+ "comments" : map [string ]any {
723
+ "totalCount" : 1 ,
724
+ },
716
725
},
717
726
}
718
727
@@ -875,8 +884,8 @@ func Test_ListIssues(t *testing.T) {
875
884
}
876
885
877
886
// Define the actual query strings that match the implementation
878
- qBasicNoLabels := "query($after:String$direction:OrderDirection!$first:Int!$orderBy:IssueOrderField!$owner:String!$repo:String!$states:[IssueState!]!){repository(owner: $owner, name: $repo){issues(first: $first, after: $after, states: $states, orderBy: {field: $orderBy, direction: $direction}){nodes{number,title,body,state,databaseId,author{login},createdAt,updatedAt,labels(first: 100){nodes{name,id,description}}},pageInfo{hasNextPage,hasPreviousPage,startCursor,endCursor},totalCount}}}"
879
- qWithLabels := "query($after:String$direction:OrderDirection!$first:Int!$labels:[String!]!$orderBy:IssueOrderField!$owner:String!$repo:String!$states:[IssueState!]!){repository(owner: $owner, name: $repo){issues(first: $first, after: $after, labels: $labels, states: $states, orderBy: {field: $orderBy, direction: $direction}){nodes{number,title,body,state,databaseId,author{login},createdAt,updatedAt,labels(first: 100){nodes{name,id,description}}},pageInfo{hasNextPage,hasPreviousPage,startCursor,endCursor},totalCount}}}"
887
+ qBasicNoLabels := "query($after:String$direction:OrderDirection!$first:Int!$orderBy:IssueOrderField!$owner:String!$repo:String!$states:[IssueState!]!){repository(owner: $owner, name: $repo){issues(first: $first, after: $after, states: $states, orderBy: {field: $orderBy, direction: $direction}){nodes{number,title,body,state,databaseId,author{login},createdAt,updatedAt,labels(first: 100){nodes{name,id,description}},comments{totalCount} },pageInfo{hasNextPage,hasPreviousPage,startCursor,endCursor},totalCount}}}"
888
+ qWithLabels := "query($after:String$direction:OrderDirection!$first:Int!$labels:[String!]!$orderBy:IssueOrderField!$owner:String!$repo:String!$states:[IssueState!]!){repository(owner: $owner, name: $repo){issues(first: $first, after: $after, labels: $labels, states: $states, orderBy: {field: $orderBy, direction: $direction}){nodes{number,title,body,state,databaseId,author{login},createdAt,updatedAt,labels(first: 100){nodes{name,id,description}},comments{totalCount} },pageInfo{hasNextPage,hasPreviousPage,startCursor,endCursor},totalCount}}}"
880
889
881
890
for _ , tc := range tests {
882
891
t .Run (tc .name , func (t * testing.T ) {
0 commit comments