GitHubPullRequest

A repository pull request.

EXAMPLE USAGES
GitHubMergePullRequest

Merge a GitHub pull request by its number with $title as the commit message.

Note as a precaution against merging a PR into the wrong target, you'll need to provide the current sha of the target branch head. You can find the sha under the headRef.oid field of the Pull Request, as per the GitHubGetPullRequest example

To merge the first PR on the OneGraph GraphQL Docs Repository, we could pass in the following variables:

{
  "repoName": "graphql-docs",
  "repoOwner": "OneGraph",
  "number": 1,
  "title": "Merge the GitHub examples, thank you @dwwoelfel!",
  "sha": "44d4e20fd739f486411049b7e94849d7b3332770"
}
GitHubOpenPullRequestsQuery

Fetch the first ten open pull requests for a GitHub repository, sorted by when they were opened.

GitHubAddPullRequestComment

Add a comment to a pull request given its id - see the GitHubGetPullRequest example for how to find a PR's id given its repository and number.

GitHubGetPullRequest

Get the details of a pull request by its number.

Also see:

FIELDS
activeLockReason (GitHubLockReason)

Reason that the conversation was locked.

additions (Int!)

The number of additions in this pull request.

assignees (GitHubUserConnection!)

A list of Users assigned to this object.

author (GitHubActor)

The actor who authored the comment.

authorAssociation (GitHubCommentAuthorAssociation!)

Author's association with the subject of the comment.

autoMergeRequest (GitHubAutoMergeRequest)

Returns the auto-merge request object if one exists for this pull request.

baseRef (GitHubRef)

Identifies the base Ref associated with the pull request.

baseRefName (String!)

Identifies the name of the base Ref associated with the pull request, even if the ref has been deleted.

baseRefOid (GitHubGitObjectID!)

Identifies the oid of the base ref associated with the pull request, even if the ref has been deleted.

baseRepository (GitHubRepository)

The repository associated with this pull request's base Ref.

body (String!)

The body as Markdown.

bodyHTML (GitHubHTML!)

The body rendered to HTML.

bodyText (String!)

The body rendered to text.

changedFiles (Int!)

The number of changed files in this pull request.

checksResourcePath (GitHubURI!)

The HTTP path for the checks of this pull request.

checksUrl (GitHubURI!)

The HTTP URL for the checks of this pull request.

closed (Boolean!)

true if the pull request is closed

closedAt (GitHubDateTime)

Identifies the date and time when the object was closed.

comments (GitHubIssueCommentConnection!)

A list of comments associated with the pull request.

commits (GitHubPullRequestCommitConnection!)

A list of commits present in this pull request's head branch not present in the base branch.

createdAt (GitHubDateTime!)

Identifies the date and time when the object was created.

createdViaEmail (Boolean!)

Check if this comment was created via an email reply.

databaseId (Int)

Identifies the primary key from the database.

deletions (Int!)

The number of deletions in this pull request.

editor (GitHubActor)

The actor who edited this pull request's body.

files (GitHubPullRequestChangedFileConnection)

Lists the files changed within this pull request.

headRef (GitHubRef)

Identifies the head Ref associated with the pull request.

headRefName (String!)

Identifies the name of the head Ref associated with the pull request, even if the ref has been deleted.

headRefOid (GitHubGitObjectID!)

Identifies the oid of the head ref associated with the pull request, even if the ref has been deleted.

headRepository (GitHubRepository)

The repository associated with this pull request's head Ref.

headRepositoryOwner (GitHubRepositoryOwner)

The owner of the repository associated with this pull request's head Ref.

hovercard (GitHubHovercard!)

The hovercard information for this issue

id (ID!)

No description

includesCreatedEdit (Boolean!)

Check if this comment was edited and includes an edit with the creation data

isCrossRepository (Boolean!)

The head and base repositories are different.

isDraft (Boolean!)

Identifies if the pull request is a draft.

isReadByViewer (Boolean)

Is this pull request read by the viewer

labels (GitHubLabelConnection)

A list of labels associated with the object.

lastEditedAt (GitHubDateTime)

The moment the editor made the last edit

latestOpinionatedReviews (GitHubPullRequestReviewConnection)

A list of latest reviews per user associated with the pull request.

latestReviews (GitHubPullRequestReviewConnection)

A list of latest reviews per user associated with the pull request that are not also pending review.

locked (Boolean!)

true if the pull request is locked

maintainerCanModify (Boolean!)

Indicates whether maintainers can modify the pull request.

mergeable (GitHubMergeableState!)

Whether or not the pull request can be merged based on the existence of merge conflicts.

mergeCommit (GitHubCommit)

The commit that was created when this pull request was merged.

merged (Boolean!)

Whether or not the pull request was merged.

mergedAt (GitHubDateTime)

The date and time that the pull request was merged.

mergedBy (GitHubActor)

The actor who merged the pull request.

milestone (GitHubMilestone)

Identifies the milestone associated with the pull request.

number (Int!)

Identifies the pull request number.

oneGraphId (ID!)

Unique id across all of OneGraph

oneGraphLinkedNodes (OneGraphLinkedNodesConnection!)

List of OneGraphNodes that are linked from this node.

participants (GitHubUserConnection!)

A list of Users that are participating in the Pull Request conversation.

permalink (GitHubURI!)

The permalink to the pull request.

potentialMergeCommit (GitHubCommit)

The commit that GitHub automatically generated to test if this pull request could be merged. This field will not return a value if the pull request is merged, or if the test merge commit is still being generated. See the mergeable field for more details on the mergeability of the pull request.

projectCards (GitHubProjectCardConnection!)

List of project cards associated with this pull request.

publishedAt (GitHubDateTime)

Identifies when the comment was published at.

reactionGroups ([GitHubReactionGroup!])

A list of reactions grouped by content left on the subject.

reactions (GitHubReactionConnection!)

A list of Reactions left on the Issue.

repository (GitHubRepository!)

The repository associated with this node.

resourcePath (GitHubURI!)

The HTTP path for this pull request.

revertResourcePath (GitHubURI!)

The HTTP path for reverting this pull request.

revertUrl (GitHubURI!)

The HTTP URL for reverting this pull request.

reviewDecision (GitHubPullRequestReviewDecision)

The current status of this pull request with respect to code review.

reviewRequests (GitHubReviewRequestConnection)

A list of review requests associated with the pull request.

reviews (GitHubPullRequestReviewConnection)

A list of reviews associated with the pull request.

reviewThreads (GitHubPullRequestReviewThreadConnection!)

The list of all review threads for this pull request.

state (GitHubPullRequestState!)

Identifies the state of the pull request.

suggestedReviewers ([GitHubSuggestedReviewer]!)

A list of reviewer suggestions based on commit history and past review comments.

timelineItems (GitHubPullRequestTimelineItemsConnection!)

A list of events, comments, commits, etc. associated with the pull request.

title (String!)

Identifies the pull request title.

updatedAt (GitHubDateTime!)

Identifies the date and time when the object was last updated.

url (GitHubURI!)

The HTTP URL for this pull request.

userContentEdits (GitHubUserContentEditConnection)

A list of edits to this content.

viewerCanApplySuggestion (Boolean!)

Whether or not the viewer can apply suggestion.

viewerCanDeleteHeadRef (Boolean!)

Check if the viewer can restore the deleted head ref.

viewerCanDisableAutoMerge (Boolean!)

Whether or not the viewer can disable auto-merge

viewerCanEnableAutoMerge (Boolean!)

Whether or not the viewer can enable auto-merge

viewerCannotUpdateReasons ([GitHubCommentCannotUpdateReason!]!)

Reasons why the current viewer can not update this comment.

viewerCanReact (Boolean!)

Can user react to this subject

viewerCanSubscribe (Boolean!)

Check if the viewer is able to change their subscription status for the repository.

viewerCanUpdate (Boolean!)

Check if the current viewer can update this object.

viewerDidAuthor (Boolean!)

Did the viewer author this comment.

viewerLatestReview (GitHubPullRequestReview)

The latest review given from the viewer.

viewerLatestReviewRequest (GitHubReviewRequest)

The person who has requested the viewer for review on this pull request.

viewerMergeBodyText (String!)

The merge body text for the viewer and method.

viewerMergeHeadlineText (String!)

The merge headline text for the viewer and method.

viewerSubscription (GitHubSubscriptionState)

Identifies if the viewer is watching, not watching, or ignoring the subscribable entity.

DEPRECATED FIELDS
IMPLEMENTS
OneGraphNode

An object with a globally unique id across all of OneGraph

GitHubAssignable

An object that can have users assigned to it.

GitHubClosable

An object that can be closed

GitHubComment

Represents a comment.

GitHubLabelable

An object that can have labels assigned to it.

GitHubLockable

An object that can be locked.

GitHubNode

An object with an ID.

GitHubReactable

Represents a subject that can be reacted on.

GitHubRepositoryNode

Represents a object that belongs to a repository.

GitHubSubscribable

Entities that can be subscribed to for web and email notifications.

GitHubUniformResourceLocatable

Represents a type that can be retrieved by a URL.

GitHubUpdatable

Entities that can be updated.

GitHubUpdatableComment

Comments that can be updated.

REQUIRED BY
GitHubAutomaticBaseChangeFailedEvent

Represents a 'automatic_base_change_failed' event on a given pull request.

GitHubAutomaticBaseChangeSucceededEvent

Represents a 'automatic_base_change_succeeded' event on a given pull request.

GitHubAutoMergeDisabledEvent

Represents a 'auto_merge_disabled' event on a given pull request.

GitHubAutoMergeEnabledEvent

Represents a 'auto_merge_enabled' event on a given pull request.

GitHubAutoMergeRequest

Represents an auto-merge request for a pull request

GitHubAutoRebaseEnabledEvent

Represents a 'auto_rebase_enabled' event on a given pull request.

GitHubAutoSquashEnabledEvent

Represents a 'auto_squash_enabled' event on a given pull request.

GitHubBaseRefChangedEvent

Represents a 'base_ref_changed' event on a given issue or pull request.

GitHubBaseRefDeletedEvent

Represents a 'base_ref_deleted' event on a given pull request.

GitHubBaseRefForcePushedEvent

Represents a 'base_ref_force_pushed' event on a given pull request.

GitHubClosePullRequestPayload

Autogenerated return type of ClosePullRequest

GitHubConvertToDraftEvent

Represents a 'convert_to_draft' event on a given pull request.

GitHubCreatedPullRequestContribution

Represents the contribution a user made on GitHub by opening a pull request.

GitHubCreatedPullRequestReviewContribution

Represents the contribution a user made by leaving a review on a pull request.

GitHubCreatePullRequestPayload

Autogenerated return type of CreatePullRequest

GitHubDeployedEvent

Represents a 'deployed' event on a given pull request.

GitHubDeploymentEnvironmentChangedEvent

Represents a 'deployment_environment_changed' event on a given pull request.

GitHubDisablePullRequestAutoMergePayload

Autogenerated return type of DisablePullRequestAutoMerge

GitHubEnablePullRequestAutoMergePayload

Autogenerated return type of EnablePullRequestAutoMerge

GitHubHeadRefDeletedEvent

Represents a 'head_ref_deleted' event on a given pull request.

GitHubHeadRefForcePushedEvent

Represents a 'head_ref_force_pushed' event on a given pull request.

GitHubHeadRefRestoredEvent

Represents a 'head_ref_restored' event on a given pull request.

GitHubIssueComment

Represents a comment on an Issue.

GitHubMarkFileAsViewedPayload

Autogenerated return type of MarkFileAsViewed

GitHubMarkPullRequestReadyForReviewPayload

Autogenerated return type of MarkPullRequestReadyForReview

GitHubMergedEvent

Represents a 'merged' event on a given pull request.

GitHubMergePullRequestPayload

Autogenerated return type of MergePullRequest

GitHubPullRequestCommit

Represents a Git commit part of a pull request.

GitHubPullRequestCommitCommentThread

Represents a commit comment thread part of a pull request.

GitHubPullRequestConnection

The connection type for PullRequest.

GitHubPullRequestEdge

An edge in a connection.

GitHubPullRequestReview

A review object for a given pull request.

GitHubPullRequestReviewComment

A review comment associated with a given repository pull request.

GitHubPullRequestReviewThread

A threaded list of comments for a given pull request.

GitHubPullRequestRevisionMarker

Represents the latest point in the pull request timeline for which the viewer has seen the pull request's commits.

GitHubReadyForReviewEvent

Represents a 'ready_for_review' event on a given pull request.

GitHubReopenPullRequestPayload

Autogenerated return type of ReopenPullRequest

GitHubRepository

A repository contains the content for a project.

GitHubRequestReviewsPayload

Autogenerated return type of RequestReviews

GitHubReviewDismissedEvent

Represents a 'review_dismissed' event on a given issue or pull request.

GitHubReviewRequest

A request for a user to review a pull request.

GitHubReviewRequestedEvent

Represents an 'review_requested' event on a given pull request.

GitHubReviewRequestRemovedEvent

Represents an 'review_request_removed' event on a given pull request.

GitHubUnmarkFileAsViewedPayload

Autogenerated return type of UnmarkFileAsViewed

GitHubUpdatePullRequestPayload

Autogenerated return type of UpdatePullRequest

____________________________________________________________________________________________________