Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GetPullRequestsQuery #61

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
}
}
}
}
}
}
}
}
}

```