I have a graphql query which enables me to retrieve all issues for a repository, filtered by some criteria. Now in my team, we have one repository for the code, and one for the issues, so external people can file issues without having access to our internal discussions.
When we make a PR, we reference the original issue on the issues repo.
What I want to do, is get all the PRs in the second repo that reference issues in the first one.
So far I have
const query = `{
repository(owner:"${owner}", name:"${repository}") {
issues(last:20, states:CLOSED, labels: ["type:bug"]) {
edges {
node {
title
url
labels(first:20) {
edges {
node {
name
}
}
}
}
}
}
}
}`;
This gets me the issues on the first repo, but can I get the PRs on the second in the same GraphQL call, or should I collect the issue IDs on the TS side and make a different query?