@@ -681,6 +681,9 @@ func Test_ListIssues(t *testing.T) {
681681 {"name" : "bug" , "id" : "label1" , "description" : "Bug label" },
682682 },
683683 },
684+ "comments" : map [string ]any {
685+ "totalCount" : 5 ,
686+ },
684687 },
685688 {
686689 "number" : 456 ,
@@ -696,6 +699,9 @@ func Test_ListIssues(t *testing.T) {
696699 {"name" : "enhancement" , "id" : "label2" , "description" : "Enhancement label" },
697700 },
698701 },
702+ "comments" : map [string ]any {
703+ "totalCount" : 3 ,
704+ },
699705 },
700706 }
701707
@@ -713,6 +719,9 @@ func Test_ListIssues(t *testing.T) {
713719 "labels" : map [string ]any {
714720 "nodes" : []map [string ]any {},
715721 },
722+ "comments" : map [string ]any {
723+ "totalCount" : 1 ,
724+ },
716725 },
717726 }
718727
@@ -875,8 +884,8 @@ func Test_ListIssues(t *testing.T) {
875884 }
876885
877886 // 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}}}"
880889
881890 for _ , tc := range tests {
882891 t .Run (tc .name , func (t * testing.T ) {
0 commit comments