This repository was archived by the owner on Nov 6, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
This repository was archived by the owner on Nov 6, 2025. It is now read-only.
Add GraphQL fields to PullRequests query #170
Copy link
Copy link
Closed
Description
1. Update PullRequests query as follows:
PullRequests Query
query PullRequests(
$owner: String!
$name: String!
$first: Int
$last: Int
$before: String
$after: String
) {
repository(owner: $owner, name: $name) {
pullRequests(first: $first, last: $last, before: $before, after: $after) {
pageInfo {
hasNextPage
endCursor
}
nodes {
id
number
title
body
state
createdAt
updatedAt
closedAt
mergedAt
author {
__typename
... on User {
login
}
}
additions
deletions
url
repository {
owner {
__typename
login
}
name
}
labels(last: 5) {
nodes {
name
}
}
comments(last: 100) {
totalCount
nodes {
body
createdAt
updatedAt
author {
__typename
... on User {
login
}
}
}
}
reviewDecision
assignees(last: 15) {
nodes {
login
}
}
reviewRequests(last: 10) {
nodes {
requestedReviewer {
__typename
... on User {
login
}
}
}
}
reviews(last: 10) {
totalCount
nodes {
author {
__typename
... on User {
login
}
}
state
body
url
createdAt
publishedAt
submittedAt
isMinimized
comments(last: 100) {
totalCount
nodes {
body
createdAt
updatedAt
author {
__typename
... on User {
login
}
}
}
}
}
}
commits(last: 20) {
totalCount
nodes {
commit {
additions
deletions
message
messageBody
author {
user {
login
}
}
changedFilesIfAvailable
committedDate
committer {
user {
login
}
}
}
}
}
}
}
}
}2. Add fields to graphql::pull_request::PullRequest struct
To store the retrieved data in the database, the graphql::pull_request::PullRequest struct must be updated. Each field returned by the GraphQL query should be mapped to a corresponding field in the struct.
Metadata
Metadata
Assignees
Labels
No labels