GraphQL associatedPullRequests on a Commit object from fork

Hello,

we’re using GHE 2.18, I’m trying to get Pull Request information using following query:

query($owner: String!, $repo: String!, $sha: GitObjectID!) {
  repository(owner: $owner, name: $repo) {
    object(oid: $sha) {
      ... on Commit {
        associatedPullRequests(first: 10) {
          nodes {
            number
            state
          }
        }
      }
    }
  }
}


{
	"owner": "org1",
	"repo": "repo1",
	"sha": "708574e01b438a754904e6b159bb3592619985ce"
}

As an input I know my org and repository and the commit sha (taking it from a webhook).

Everything is fine when a contributor has created branch in the same repository, but output is empty when PR is created from a fork.

{
  "data": {
    "repository": {
      "object": {
        "associatedPullRequests": {
          "nodes": []
        }
      }
    }
  }
}

Is it possible to get PRs info knowing commit sha only? 

Thank you! 

UPD: I understand I can replace owner to fork owner, but is there any other way? 

Did you ever manage to answer your question? I’m facing the exact same issue myself, and I’m not sure what happens if a private repo is forked, will I have access to lookup that info or not…