Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 65 additions & 0 deletions src/examples/GetPullRequestsQuery.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
---
description: |
Get a list of Pull Requests filtered by a tag
contributedBy: "@sgrove"
variables: "{\"labelableId\":\"MDU6SXNzdWU1NzY1OTM2MTY=\",\"labelIds\":[\"MDU6TGFiZWwxODkwODQwNjIw\"]}"
title: "GetPullRequestsQuery"
result: |
null
---

```graphql
query GetPullRequestsQuery(
$filterTag: [String!]
$repoName: String!
$repoOwner: String!
$limit: Int!
) {
gitHub {
repository(name: $repoName, owner: $repoOwner) {
pullRequests(
orderBy: { direction: DESC, field: CREATED_AT }
first: $limit
states: OPEN
labels: $filterTag
) {
nodes {
number
id
title
body
isCrossRepository
comments(last: 20) {
nodes {
id
bodyText
author {
login
avatarUrl
}
createdAt
}
}
baseRefName
headRef {
prefix
name
id
target {
id
oid
repository {
owner {
login
id
}
}
}
}
}
}
}
}
}

```