Skip to content

Find all comments by a user with graphql v4 api #24400

Discussion options

You must be logged in to vote

A query like this should give you what you’re looking for:

{
  user(login: "lee-dohm") {
    commitComments(first: 100) {
      nodes {
        commit {
          repository {
            nameWithOwner
          }
          abbreviatedOid
        }
        body
      }
    }
    issueComments(first: 100) {
      nodes {
        repository {
          nameWithOwner
        }
        issue {
          number
        }
        pullRequest {
          number
        }
        body
      }
    }
  }
}

There’s also a gistComments connection if you’re interested in that, but it sounds like you want comments within the context of a repository.

I hope that helps!

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants