@@ -85,7 +85,7 @@ var defaultFields = []string{
8585 "url" , "number" , "title" , "state" , "body" , "author" , "autoMergeRequest" ,
8686 "isDraft" , "maintainerCanModify" , "mergeable" , "additions" , "deletions" , "commitsCount" ,
8787 "baseRefName" , "headRefName" , "headRepositoryOwner" , "headRepository" , "isCrossRepository" ,
88- "reviewRequests" , "reviews" , "assignees" , "labels" , "projectCards" , "milestone" ,
88+ "reviewRequests" , "reviews" , "assignees" , "labels" , "projectCards" , "projectItems" , " milestone" ,
8989 "comments" , "reactionGroups" , "createdAt" , "statusCheckRollup" ,
9090}
9191
@@ -439,11 +439,23 @@ func prLabelList(pr api.PullRequest, cs *iostreams.ColorScheme) string {
439439}
440440
441441func prProjectList (pr api.PullRequest ) string {
442- if len (pr .ProjectCards .Nodes ) == 0 {
442+ totalCount := pr .ProjectCards .TotalCount + pr .ProjectItems .TotalCount
443+ count := len (pr .ProjectCards .Nodes ) + len (pr .ProjectItems .Nodes )
444+
445+ if count == 0 {
443446 return ""
444447 }
445448
446449 projectNames := make ([]string , 0 , len (pr .ProjectCards .Nodes ))
450+
451+ for _ , project := range pr .ProjectItems .Nodes {
452+ colName := project .Status .Name
453+ if colName == "" {
454+ colName = "No Status"
455+ }
456+ projectNames = append (projectNames , fmt .Sprintf ("%s (%s)" , project .Project .Title , colName ))
457+ }
458+
447459 for _ , project := range pr .ProjectCards .Nodes {
448460 if project == nil {
449461 continue
@@ -456,7 +468,7 @@ func prProjectList(pr api.PullRequest) string {
456468 }
457469
458470 list := strings .Join (projectNames , ", " )
459- if pr . ProjectCards . TotalCount > len ( pr . ProjectCards . Nodes ) {
471+ if totalCount > count {
460472 list += ", …"
461473 }
462474 return list
0 commit comments