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

State of conversation (marked resolved)

I am trying to find a way to get the state of any resolved and unresolved comments on a pull request review, these would be comments that are either 'outdated' (marked by a subsequent commit) or manually marked as 'resolved'

1 Reply
Pilot Lvl 2
Message 2 of 2

Re: State of conversation (marked resolved)

I know a good start using GitHub's GraphQL API v4 would be to start retrieving data through the Repository connection, and then through the pullRequests object. It would look similar to this:

query {
  viewer {
    repository(name: "test-repo") {
      pullRequests(last: 1) {
        edges {
          node {
            reviews(last: 1) {
              edges {
                node {
                  comments {
                    edges {
                      node {
                        # put extra connections/objects here
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}

^ this example should get all comments from a repository named "test-repo" under the verified user's account; gathers comments from the last pull-request and review.

 

You should be able to customize the GraphQL call to your liking to retrieve as much data as you want and hopefully receive what you want. I hope this helps! If you have any other questions, please don't hesitate to reply once more to this thread!

 

Gavin R. Isgar - Freelance Software Developer