GitHub GraphQL APIでApproveとCheckのステータスを取得する

クエリ

{
  search(type: ISSUE, last: 100, query: "is:open is:pr author:@me org:qubole") {
    nodes {
      ... on PullRequest {
        title
        url
        reviewDecision
        commits(last: 1) {
          nodes {
            commit {
              statusCheckRollup {
                state
              }
            }
          }
        }
      }
    }
  }
}

結果

{
  "data": {
    "search": {
      "nodes": [
        {
          "title": "Fix or skip deepsource check in commands.py",
          "url": "https://github.com/qubole/qds-sdk-py/pull/341",
          "reviewDecision": "REVIEW_REQUIRED",
          "commits": {
            "nodes": [
              {
                "commit": {
                  "statusCheckRollup": {
                    "state": "SUCCESS"
                  }
                }
              }
            ]
          }
        }
      ]
    }
  }
}

cf.