Once a pull request is approved by any member of a requested team, it disappears from the GitHub dashboard, even if it lingers in an open state. How can we query using the Github v4 GraphQL the open pull requests created by any members of a particular team?
{
search(query: "type:pr state:open review-requested:StevenACoffman", type: ISSUE, first: 100) {
issueCount
pageInfo {
endCursor
startCursor
}
edges {
node {
... on PullRequest {
url
}
}
}
}
}
The query for a team's requested reviews is: team-review-requested:ORG/TEAMNAME
where ORG
should be replaced with the organization, and TEAMNAME
replaced with the team name.
Neither of these queries show open pull requests that were created by a teammate if they were approved by any other teammates.
The query for a team by name is:
{
organization(login: "khan") {
teams(first: 100, query: "districts") {
totalCount
edges {
node {
members {
edges {
node {
name
login
}
}
}
name
description
}
}
}
}
}