Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Pilot Lvl 1
Message 1 of 2

checkSuites is always empty

Hello,

 

here is my query:

repository(name: "...", owner: ...) {
      name,
      owner {
          login
      },
      pullRequest(number: 312) {
        id,
        commits(last: 3) {
            edges {
                node {
                    commit {
                        id,
                        message,
                        checkSuites(first: 50) {
                            nodes {
                                app {
                                    name
                                }
                            }
                        }
                    }
                }
            }
        }
      }
    }

In the GitHub's UI I do see that the last commits do have check runs happened. But when I'm making this request to the API I always get an empty `checkSuites`'s `nodes` array. Any idea?

1 Reply
Community Manager
Message 2 of 2

Re: checkSuites is always empty

I'm not sure why you're getting the results you are. I just ran the following query:

 

query {
  repository(name: "atom", owner: "atom") {
      name,
      owner {
          login
      },
      pullRequest(number: 19166) {
        id,
        commits(last: 3) {
            edges {
                node {
                    commit {
                        id,
                        message,
                        checkSuites(first: 50) {
                            nodes {
                                app {
                                    name
                                }
                            }
                        }
                    }
                }
            }
        }
      }
    }
}

and got a result with `checkSuites` nodes:

 

{
  "data": {
    "repository": {
      "name": "atom",
      "owner": {
        "login": "atom"
      },
      "pullRequest": {
        "id": "MDExOlB1bGxSZXF1ZXN0MjcwNjAyMDUy",
        "commits": {
          "edges": [
            {
              "node": {
                "commit": {
                  "id": "MDY6Q29tbWl0MzIyODUwNTo0NTI1MjFmODVmOGYyMjNiY2U0Y2U3MjBlMzdmZWVmMjQzNjllNDBk",
                  "message": "Apply suggestions from code review\n\nCo-Authored-By: smashwilson <smashwilson@github.com>",
                  "checkSuites": {
                    "nodes": [
                      {
                        "app": {
                          "name": "Travis CI"
                        }
                      }
                    ]
                  }
                }
              }
            },
            {
              "node": {
                "commit": {
                  "id": "MDY6Q29tbWl0MzIyODUwNTo2NjM3ZjUyMThiMjY4M2E0Mzg2NjU3YjQwMzE1OGZiMjFlMjQwYTkw",
                  "message": "Re-emoji the 1.36.1 columns",
                  "checkSuites": {
                    "nodes": [
                      {
                        "app": {
                          "name": "Travis CI"
                        }
                      }
                    ]
                  }
                }
              }
            },
            {
              "node": {
                "commit": {
                  "id": "MDY6Q29tbWl0MzIyODUwNTo1NTQ3YTdlNDc2NjU2YjgxNTVhOWIwNmM4ZjUzNGQ5MTkxNWNlOGZm",
                  "message": "Re-verify and fix some behavior on a suspicious entry",
                  "checkSuites": {
                    "nodes": [
                      {
                        "app": {
                          "name": "Travis CI"
                        }
                      }
                    ]
                  }
                }
              }
            }
          ]
        }
      }
    }
  }
}

Is it possible that your tools are not creating check suites?