PullRequestReviewThread ~ no data?


#1

Hi,

I’m trying to use the PullRequestReviewThread to get a complete list of review comments on a PR. I get no data under the PullRequestReviewThread, but do get PullRequestReview comment and comments under there, but not all are there. I saw another post regarding this, but that was originally from 2016. Is this not working? Thanks for any help!

query api_query_pr($repo_name:String!, $pull_request_id:Int!) {
  organization(login: "jquery") {
    repository(name: $repo_name) {
      name
      issueOrPullRequest(number: $pull_request_id) {
        ... on PullRequest {
          title
          number
          bodyHTML
          timeline(last: 100) {
            nodes {
              __typename
              ... on IssueComment {
                author {
                  login
                }
                createdAt
                bodyHTML
              }
              ... on PullRequestReviewThread {          			
                comments(last: 100) {
                  nodes {
                    ...commentFields
                    path
                    diffHunk
                  }
                }
              }
              ... on PullRequestReview {
                comments(first: 100) {
                  nodes {
                    ...commentFields
                    path
                    diffHunk
                  }
                }
                ...commentFields
                state
                submittedAt
                author {
                  login
                }
              }
            }
          }
        }
      }
    }
  }
}
fragment commentFields on Comment {
  bodyHTML
  createdAt
}

#2

Hi @emmtqg – thanks for your question. I’ve asked the team to take a look at this today. We’ll update here as soon as we know more.


#3

Hi @emmtqg.

I get no data under the PullRequestReviewThread, but do get PullRequestReview comment and comments under there, but not all are there.

Can you help me understand which comments you are expecting but are missing from the response?


#4

Hi Lizz,

Thanks so much for getting back to me! (I’m another Liz). I do see review comments, but some of the replies are missing. From one of the threads I’m following on this, the author posted an example that I’ve run through the GQL explorer, and I see the same behavior of skipped replies that I’m seeing. The example is this post https://platform.github.community/t/pullrequestreviewthread-no-longer-showing-up-in-timeline-for-prs/2755/17

It’s the threaded comments that aren’t being seen. I’d illustrate with my own example, but I’m seeing it on our private repo. I’m thinking it must be a problem because there is no data in the PullRequestReviewThread field in my own queries.

Thanks again, appreciate your time looking at this!
Best regards -
Liz


#5

(I’m another Liz).

A fellow Liz! :wave:

I do see review comments, but some of the replies are missing.

Thank you for the clarification and linking to the related topic – they were both very helpful. I’ve relayed the information to the team working in this area of the schema and they are aware of the issue. I will continue to track that work and reply here with any updates I come across.

Cheers,

Lizz