Include projectsV2 in GraphQL query

Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
This commit is contained in:
Babak K. Shandiz 2024-04-21 11:00:19 +01:00
parent fc2aec380d
commit 9e1f9d6101
No known key found for this signature in database
GPG key ID: 44950AED81AD710F
2 changed files with 6 additions and 0 deletions

View file

@ -442,6 +442,7 @@ var RepositoryFields = []string{
"assignableUsers",
"mentionableUsers",
"projects",
"projectsV2",
// "branchProtectionRules", // too complex to expose
// "collaborators", // does it make sense to expose without affiliation filter?
@ -487,6 +488,8 @@ func RepositoryGraphQL(fields []string) string {
q = append(q, "mentionableUsers(first:100){nodes{id,login,name}}")
case "projects":
q = append(q, "projects(first:100,states:OPEN){nodes{id,name,number,body,resourcePath}}")
case "projectsV2":
q = append(q, "projectsV2(first:100,query:\"is:open\"){nodes{id,number,title,readme,url}}")
case "watchers":
q = append(q, "watchers{totalCount}")
case "issues":