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

[Bug] v4 (GraphQL) API: PullRequestReviewComment points to wrong commit id

Hi this API is really great!  I know it's still beta but think I found a bug in the PullRequestReviewComment.  Take https://github.com/bitcoin/bitcoin/pull/6103 for example, when the comment commit id it always points to the last commit of the PR - not the correct commit within the PR.

 

I can send my query, let me know if that's helpful to reproduce.

1 Reply
Copilot Lvl 2
Message 2 of 2

Re: [Bug] v4 (GraphQL) API: PullRequestReviewComment points to wrong commit id

Perhaps additional information will help.  Query:

 

{
  repository(owner: "bitcoin", name: "bitcoin") {
    pullRequest(number: 6103) {
      id
      url
      title
      author {
        login
      }
      commits {
        totalCount
      }
      reviewThreads(first: 50) {
        totalCount
        pageInfo {
          endCursor
          startCursor
        }
        nodes {
          id
          isResolved
          resolvedBy {
            id
          }
          comments(first: 50) {
            totalCount
            nodes {
              id
              author {
                login
              }
              createdAt
              path
              position
              originalPosition
              commit {
                oid
              }
              body
            }
          }
        }
      }
    }
  }
}

Note that every comment's OID is `029e278286cb861901c9cb8e1b84855ec1640aac`, which is the last commit of the PR, even though many comments were made in other commits within the PR. 

 

Am I interpreting this incorrectly or is there a bug?