isaacs / github

Just a place to track issues and feature requests that I have for github
2.21k stars 129 forks source link

GitHub GraphQL (v4) API - how to count issues with no comments? #1708

Open oprogramador opened 4 years ago

oprogramador commented 4 years ago

e.g. query is:issue is:open comments:0 ( https://github.com/isaacs/github/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+comments%3A0 ) finds that isaacs/github repo has 393 open issues with no comments

However, in the GraphQL API I don't know how to check that. In https://developer.github.com/v4/explorer/ I can type the following query:

query {
  repository(owner: "isaacs", name: "github") {
    openIssues: issues(states: OPEN) {
      totalCount
    }
  }
}

which finds that isaacs/github has 1170 open issues but I want to select only these with no comments.

callain commented 4 years ago

@oprogramador You need to use the Search for Issues query

https://help.github.com/en/github/searching-for-information-on-github/searching-issues-and-pull-requests#search-by-number-of-comments