@ 261105.4
current
query PR($prid: Int!, $owner: String!, $repo: String!) {
  repository(owner: $owner, name: $repo) {
    pullRequest(number: $prid) {
      createdAt,
      authorAssociation,
      author {
        ... on User {
          login,
          email,
          name
        }
      },
      url,
      bodyHTML,
      bodyText,
      labels(first: 100) {
        nodes {
          name
        }
      },
      files(first: 100) {
        nodes {
          path
        }
      },
      # CI data is only consumed for the pull request's head commit. Querying
      # it for every commit multiplies the GraphQL rate-limit cost.
      headCommit: commits(last: 1) {
        nodes {
          commit {
            oid
            # 15368 is the GitHub Actions App ID on GitHub.com. Filtering avoids
            # querying App metadata that GITHUB_TOKEN cannot read for suites
            # created by third-party Apps such as Jenkins and Codecov.
            # https://api.github.com/apps/github-actions
            checkSuites(first: 100, filterBy: { appId: 15368 }) {
              nodes {
                conclusion,
                status,
                workflowRun {
                  event
                  runNumber
                  workflow {
                    id
                  }
                }
                checkRuns(first: 40) {
                  totalCount
                  nodes {
                    name
                    status
                    conclusion
                    detailsUrl
                  }
                }
              }
            }
            status {
              state
            }
          }
        }
      },
      title,
      baseRefName,
      headRefName,
      changedFiles,
      mergeable,
      closed,
      closedAt,
      merged,
      mergedAt,
      mergeCommit {
        oid
      }
    }
  }
}