JDBC Driver for GitHub

Build 24.0.9060

PullRequests

Lists information about pull requests in a repository.

Table-Specific Information

Select

The driver uses the GitHub API to process WHERE clause conditions built with the below columns and operators. The driver processes other filters client-side within the driver.

  • BaseRefName supports the '=' comparison operator.
  • HeadRefName supports the '=' comparison operator.
  • State supports the '=, IN' comparison operators.
  • Number supports the '=' comparison operator.

The driver uses the GitHub API to process ORDER BY clause conditions built with the following column. The driver processes ordering by other columns client-side within the driver.

  • UpdatedAt
  • CreatedAt
For example, the following queries are processed server side:
SELECT * FROM [Repository].[PullRequests] WHERE [Repository].[PullRequests].[BaseRefName] = 'newbranch'

SELECT * FROM [Repository].[PullRequests] WHERE [Repository].[PullRequests].[HeadRefName] = 'master'

SELECT * FROM [Repository].[PullRequests] WHERE [Repository].[PullRequests].[State] = 'OPEN'

SELECT * FROM [Repository].[PullRequests] WHERE [Repository].[PullRequests].[Number] = '100'

Insert

The following inputs can be used in INSERT statements:

HeadRepositoryId, BaseRefName, HeadRefName, Title, Body, IsDraft, MaintainerCanModify

INSERT INTO [Repository].[PullRequests] ([Title], [BaseRefName], [HeadRefName]) VALUES ('TestPR', '1-1-out-of-100-issues', 'main')

Update

The following inputs can be used to update a pull request's fields:

BaseRefName, Title, Body, State, MaintainerCanModify, MilestoneId, AssigneeIds, LabelIds

The following inputs can be used to close a pull request:

Closed

UPDATE [Repository].[PullRequests] SET [Title]='NewPRTitle', [AssigneeIds]='MDQ6VXNlcjg3ODExMTEx,U_kgDOCXOvpA' WHERE [Id]='PR_kwDOLkrwGs5zEp0s'

UPDATE PullRequests SET Closed=true WHERE Id='PR_kwDOLkrwGs5zEp0s'

Columns

Name Type ReadOnly References Description
Id [KEY] String False

The ID of the pull request.

FullDatabaseId Long False

Identifies the primary key from the database as a BigInt.

Author String False

The actor's login name who authored the comment.

AuthorAssociation String False

Author's association with the subject of the comment.

Editor String False

The actor's login name who edited this pull request's body.

HeadRepositoryId String False

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

HeadRepositoryOwner String False

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

MergedBy String False

The actor's login name who merged the pull request.

BaseRefId String False

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

BaseRefOid String False

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

BaseRefPrefix String False

Identifies the prefix of the base Ref associated with the pull request.

BaseRefName String False

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

HeadRefId String False

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

HeadRefOid String False

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

HeadRefPrefix String False

Identifies the prefix of the head Ref associated with the pull request.

HeadRefName String False

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

Title String False

Identifies the pull request title.

TitleHTML String False

Identifies the pull request title rendered to HTML.

Body String False

The body as Markdown.

BodyText String False

The body rendered to text.

BodyHTML String False

The body rendered to HTML.

State String False

Identifies the state of the pull request.

Number Int False

Identifies the pull request number.

Mergeable String False

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

Merged Bool False

Whether or not the pull request was merged.

Closed Bool False

true if the pull request is closed.

ChangedFiles Int False

The number of changed files in this pull request.

Additions Int False

The number of additions in this pull request.

Deletions Int False

The number of deletions in this pull request.

TotalCommentsCount Int False

Returns a count of how many comments this pull request has received.

ReviewDecision String False

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

Locked Bool False

true if the pull request is locked.

ActiveLockReason String False

Reason that the conversation was locked.

IsDraft Bool False

Identifies if the pull request is a draft.

IsCrossRepository Bool False

The head and base repositories are different.

MaintainerCanModify Bool False

Indicates whether maintainers can modify the pull request.

CreatedViaEmail Bool False

Check if this comment was created via an email reply.

IncludesCreatedEdit Bool False

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

MergeCommitId String False

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

PotentialMergeCommitId String False

The commit ID 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.

Permalink String False

The permalink to the pull request.

ResourcePath String False

The HTTP path for this pull request.

ChecksResourcePath String False

The HTTP path for the checks of this pull request.

RevertResourcePath String False

The HTTP path for reverting this pull request.

Url String False

The HTTP URL for this pull request.

ChecksUrl String False

The HTTP URL for the checks of this pull request.

RevertUrl String False

The HTTP URL for reverting this pull request.

LastEditedAt Datetime False

The moment the editor made the last edit.

MergedAt Datetime False

The date and time that the pull request was merged.

ClosedAt Datetime False

Identifies the date and time when the object was closed.

PublishedAt Datetime False

Identifies when the comment was published at.

UpdatedAt Datetime False

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

CreatedAt Datetime False

Identifies the date and time when the object was created.

MilestoneId String False

Identifies the milestone's ID associated with the pull request.

MilestoneTitle String False

Identifies the title of the milestone.

MilestoneNumber Int False

Identifies the number of the milestone.

AutoMergeRequestCommitHeadline String False

The commit title of the auto-merge request. If a merge queue is required by the base branch, this value will be set by the merge queue when merging.

AutoMergeRequestAuthorEmail String False

The email address of the author of this auto-merge request.

AutoMergeRequestCommitBody String False

The commit message of the auto-merge request. If a merge queue is required by the base branch, this value will be set by the merge queue when merging.

AutoMergeRequestEnabledAt Datetime False

When was this auto-merge request was enabled.

AutoMergeRequestMergeMethod String False

The merge method of the auto-merge request. If a merge queue is required by the base branch, this value will be set by the merge queue when merging.

ViewerDidAuthor Bool False

Did the viewer author this comment.

IsReadByViewer Bool False

Is this pull request read by the viewer.

ViewerSubscription String False

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

ViewerCanClose Bool False

Indicates if the object can be closed by the viewer.

ViewerCanReact Bool False

Can user react to this subject.

ViewerCanReopen Bool False

Indicates if the object can be reopened by the viewer.

ViewerCanSubscribe Bool False

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

ViewerCanApplySuggestion Bool False

Whether or not the viewer can apply suggestion.

ViewerCanEditFiles Bool False

Can the viewer edit files within this pull request.

ViewerCanDeleteHeadRef Bool False

Check if the viewer can restore the deleted head ref.

ViewerCanDisableAutoMerge Bool False

Whether or not the viewer can disable auto-merge.

ViewerCanEnableAutoMerge Bool False

Whether or not the viewer can enable auto-merge.

ViewerCanMergeAsAdmin Bool False

Indicates whether the viewer can bypass branch protections and merge the pull request immediately.

ViewerCanUpdate Bool False

Check if the current viewer can update this object.

ViewerCanUpdateBranch Bool False

Whether or not the viewer can update the head ref of this PR, by merging or rebasing the base ref. If the head ref is up to date or unable to be updated by this user, this will return false.

ViewerCannotUpdateReasons String False

Reasons why the current viewer can not update this comment.

ViewerLatestReviewRequestId String False

The ID of the viewer's latest review request.

ViewerLatestReviewId String False

The ID of the viewer's latest review.

IsMergeQueueEnabled Bool False

Indicates whether the pull request's base ref has a merge queue enabled.

IsInMergeQueue Bool False

Indicates whether the pull request is in a merge queue.

MergeQueueEntryId String False

The ID of this entry in the queue.

MergeQueueEntryJump Bool False

Whether this pull request should jump the queue.

MergeQueueEntryPosition Int False

The position of this entry in the queue.

MergeQueueEntrySolo Bool False

Does this pull request need to be deployed on its own.

MergeQueueEntryState String False

The state of this entry in the queue.

MergeQueueEntryEnqueuedAt Datetime False

The date and time this entry was added to the merge queue.

MergeQueueEntryEstimatedTimeToMerge Int False

The estimated time in seconds until this entry will be merged.

MergeQueueEntryBaseCommitId String False

The ID of the base commit in the queue entry.

MergeQueueEntryHeadCommitId String False

The ID of the head commit in the queue entry.

MergeQueueEntryMergeQueueId String False

The ID of the entry's queue.

MergeQueueEntryMergeQueueUrl String False

The HTTP URL for this merge queue.

MergeQueueEntryMergeQueueResourcePath String False

The HTTP path for this merge queue.

MergeQueueEntryMergeQueueNextEntryEstimatedTimeToMerge Int False

The estimated time in seconds until a newly added entry would be merged.

Pseudo-Columns

Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.

Name Type Description
AssigneeIds String

A simple, comma-separated list of Node IDs of assignees for this issue.

LabelIds String

A simple, comma-separated list of Node IDs of labels for this issue.

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 24.0.9060