Get body of the comment associated with a CrossReferencedEvent

schema-request

#1

I’m using the following query to get all cross references associated with an issue. I would like to see the text of the comment that referenced the issue. Is this possible? For e.g. there are two issues A and B. I write a comment in issue A with a link to issue B. Is it possible to get the body of the comment in issue A when querying cross references for issue B?

  repository(owner: $owner, name: $repo) {
    nameWithOwner
    issues(first: 10, orderBy: {field: UPDATED_AT, direction: DESC}) {
      edges {
        node {
          id
          createdAt
          updatedAt
          closedAt
          closed
          title
          state
          url
          milestone {
            id
          }
          author {
            login
          }
          timeline(first: 10) {
            nodes {
              ... on CrossReferencedEvent {
                createdAt
                referencedAt
                actor {
                  login
                }
                resourcePath
                isCrossRepository
                willCloseTarget
                source {
                  __typename
                  ... on Issue {
                    createdAt
                    url
                  }
                  ... on PullRequest {
                    url
                  }
                }
              }
            }
          }
        }
      }
      pageInfo {
        endCursor
        hasNextPage
      }
    }
  }
}

#2

Hi @amnrahman,

Thank you for opening this post. Getting the body of the comment associated with the CrossReferencedEvent doesn’t appear to be possible currently. I’ve added this to our internal tracker and we’ll update this thread when we have some more information.