PullRequests
Contains metadata about pull requests in a repository, such as their titles, descriptions, current statuses, and authors, to manage proposed changes effectively.
Table-Specific Information
Select
The 本製品 uses the GitHub API to process WHERE clause conditions that are built with the following columns and operators:
- BaseRefName supports the '=' comparison operator.
- HeadRefName supports the '=' comparison operator.
- State supports the '=,IN' comparison operators.
- Number supports the '=,IN' comparison operators.
For example, the following queries are processed server-side:
SELECT * FROM [PullRequests]
SELECT * FROM [PullRequests] WHERE [BaseRefName] = 'Val1'
SELECT * FROM [PullRequests] WHERE [HeadRefName] = 'Val1'
SELECT * FROM [PullRequests] WHERE [State] = 'OPEN'
SELECT * FROM [PullRequests] WHERE [Number] = 123
The 本製品 processes other filters client-side within the 本製品.
The 本製品 uses the GitHub API to process ORDER BY clause conditions that are built with the following columns:
- UpdatedAt
- CreatedAt
SELECT * FROM [PullRequests] ORDER BY [UpdatedAt]
SELECT * FROM [PullRequests] ORDER BY [CreatedAt]
The 本製品 uses client-side processing when ordering by any other columns. This impacts performance.
Insert
You can use the following columns to create (insert) a new record:
- HeadRepositoryId
- BaseRefName
- HeadRefName
- Title
- Body
- IsDraft
- MaintainerCanModify
INSERT INTO [PullRequests] ([Title], [BaseRefName], [HeadRefName]) VALUES ('TestPR', '1-1-out-of-100-issues', 'main')
Update
You can use the following columns to update a record:
- BaseRefName
- Title
- Body
- State
- MaintainerCanModify
- MilestoneId
You can use the following pseudo-columns to update a record:
- AssigneeIds
- LabelIds
UPDATE [PullRequests] SET [Closed] = 'false' WHERE [Id] = 'PR_kwDOLkrwGs5zEp0s'
UPDATE [PullRequests] SET [Closed] = true WHERE [Id] = 'PR_kwDOLkrwGs5zEp0s'
UPDATE [PullRequests] SET [Title] = 'NewPRTitle', [AssigneeIds] = 'MDQ6VXNlcjg3ODExMTEx,U_kgDOCXOvpA' WHERE [Id] = 'PR_kwDOLkrwGs5zEp0s'
Columns
Name | Type | ReadOnly | References | Description |
Id [KEY] | String | True |
A unique identifier for the pull request, used to differentiate it from others in the system. | |
FullDatabaseId | Long | True |
The primary database identifier for the pull request, stored as a BigInt for scalability. | |
Author | String | True |
The username of the individual who created the pull request. | |
AuthorAssociation | String | True |
Defines the relationship between the pull request's author and the repository (for example, 'OWNER', 'CONTRIBUTOR'). | |
Editor | String | True |
The username of the individual who most recently updated the pull request's body content. | |
HeadRepositoryId | String | True |
The unique identifier of the repository where the pull request's head branch resides. | |
HeadRepositoryOwner | String | True |
The username of the owner of the repository containing the pull request's head branch. | |
MergedBy | String | True |
The username of the individual who merged the pull request into the base branch. | |
BaseRefId | String | True |
The unique identifier of the base branch for this pull request, even if the branch has been deleted. | |
BaseRefOid | String | True |
The object identifier (OID) of the base branch for this pull request, even if the branch has been deleted. | |
BaseRefPrefix | String | True |
The namespace prefix (for example, 'refs/heads/') of the base branch for this pull request. | |
BaseRefName | String | False |
The name of the base branch for this pull request, even if the branch has been deleted. | |
HeadRefId | String | True |
The unique identifier of the head branch for this pull request, even if the branch has been deleted. | |
HeadRefOid | String | True |
The object identifier (OID) of the head branch for this pull request, even if the branch has been deleted. | |
HeadRefPrefix | String | True |
The namespace prefix (for example, 'refs/heads/') of the head branch for this pull request. | |
HeadRefName | String | True |
The name of the head branch for this pull request, even if the branch has been deleted. | |
Title | String | False |
The descriptive title of the pull request. | |
TitleHTML | String | True |
The title of the pull request rendered as formatted HTML. | |
Body | String | False |
The main content of the pull request, provided in Markdown for formatting. | |
BodyText | String | True |
The plain-text version of the pull request's content, stripped of any Markdown formatting. | |
BodyHTML | String | True |
The body of the pull request rendered as HTML for display purposes. | |
State | String | False |
Indicates the current status of the pull request (for example, 'OPEN', 'MERGED', 'CLOSED'). 使用できる値は次のとおりです。OPEN, CLOSED, MERGED | |
Number | Int | True |
The sequential number assigned to the pull request within the repository. | |
Mergeable | String | True |
Specifies whether the pull request can be merged without conflicts. | |
Merged | Bool | True |
A true/false indicator of whether the pull request has been successfully merged. | |
Closed | Bool | True |
A true/false indicator of whether the pull request has been closed. | |
ChangedFiles | Int | True |
The total count of files modified as part of this pull request. | |
Additions | Int | True |
The total number of lines of code added in this pull request. | |
Deletions | Int | True |
The total number of lines of code removed in this pull request. | |
TotalCommentsCount | Int | True |
The total number of comments made on this pull request, including review and inline comments. | |
ReviewDecision | String | True |
The current review status of the pull request, indicating if it has been approved or requires changes (for example, 'APPROVED', 'REQUEST_CHANGES'). | |
Locked | Bool | True |
Indicates whether the conversation on this pull request is locked to prevent further discussion. True if locked, false otherwise. | |
ActiveLockReason | String | True |
The reason provided for locking the pull request conversation, such as 'RESOLVED' or 'OFF_TOPIC'. | |
IsDraft | Bool | True |
Indicates whether this pull request is in draft mode, meaning it is not yet ready for review. True if draft, false otherwise. | |
IsCrossRepository | Bool | True |
Specifies whether the pull request originates from a different repository than the base repository. | |
MaintainerCanModify | Bool | False |
Indicates whether maintainers of the base repository have permission to make changes to this pull request. | |
CreatedViaEmail | Bool | True |
Indicates whetherthe pull request was created through an email reply, rather than through the GitHub interface. | |
IncludesCreatedEdit | Bool | True |
Specifies whether the pull request includes an edit that was made at the time of its creation. | |
MergeCommitId | String | True |
The unique identifier (commit hash) of the merge commit created when the pull request was merged. | |
PotentialMergeCommitId | String | True |
A commit hash generated by GitHub to verify if the pull request can be merged, available before the pull request is merged. | |
Permalink | String | True |
The permanent URL that links directly to this pull request. | |
ResourcePath | String | True |
The relative API path to access details about this pull request. | |
ChecksResourcePath | String | True |
The relative API path to access status checks associated with this pull request. | |
RevertResourcePath | String | True |
The relative API path used to create a revert pull request based on this pull request. | |
Url | String | True |
The full URL linking to the pull request on GitHub. | |
ChecksUrl | String | True |
The full URL linking to the status checks for this pull request on GitHub. | |
RevertUrl | String | True |
The full URL used to initiate a revert of this pull request. | |
LastEditedAt | Datetime | True |
The timestamp of when the pull request was last edited by any user. | |
MergedAt | Datetime | True |
The timestamp of when the pull request was successfully merged into the base branch. | |
ClosedAt | Datetime | True |
The timestamp of when the pull request was closed without being merged. | |
PublishedAt | Datetime | True |
The timestamp of when a comment related to this pull request was published. | |
UpdatedAt | Datetime | True |
The timestamp of the most recent update to this pull request, including title, description, or review status changes. | |
CreatedAt | Datetime | True |
The timestamp of when the pull request was originally created. | |
MilestoneId | String | False |
The unique identifier of the milestone linked to this pull request. | |
MilestoneTitle | String | True |
The descriptive title of the milestone associated with this pull request. | |
MilestoneNumber | Int | True |
The sequential number assigned to the milestone linked to this pull request. | |
AutoMergeRequestCommitHeadline | String | True |
The title of the commit created as part of the auto-merge request when required by the base branch's merge queue. | |
AutoMergeRequestAuthorEmail | String | True |
The email address of the user who initiated the auto-merge request. | |
AutoMergeRequestCommitBody | String | True |
The detailed commit message associated with the auto-merge request when required by the base branch. | |
AutoMergeRequestEnabledAt | Datetime | True |
The timestamp of when auto-merge was enabled for this pull request. | |
AutoMergeRequestMergeMethod | String | True |
Specifies the merge strategy used when auto-merging the pull request, determined by the base branch's merge queue requirements. | |
ViewerDidAuthor | Bool | True |
Indicates whether the currently authenticated user is the author of this pull request. | |
IsReadByViewer | Bool | True |
Shows whether the pull request has been marked as read by the current user. | |
ViewerSubscription | String | True |
Indicates the subscription status of the current user regarding this pull request (for example, 'SUBSCRIBED', 'IGNORED'). | |
ViewerCanLabel | Bool | True |
Specifies whether the current user has permission to add or remove labels on this pull request. | |
ViewerCanClose | Bool | True |
Indicates whether the current user can close this pull request. | |
ViewerCanReact | Bool | True |
Shows whether the current user can add emoji reactions to this pull request. | |
ViewerCanReopen | Bool | True |
Indicates whether the current user has the ability to reopen this pull request if it is closed. | |
ViewerCanSubscribe | Bool | True |
Determines whether the current user can modify their subscription settings for notifications related to this pull request. | |
ViewerCanApplySuggestion | Bool | True |
Specifies whether the current user has permission to apply suggested code changes in this pull request. | |
ViewerCanEditFiles | Bool | True |
Indicates whether the current user can edit the files modified in this pull request. | |
ViewerCanDeleteHeadRef | Bool | True |
Shows whether the current user can restore the deleted head reference of the pull request. | |
ViewerCanDisableAutoMerge | Bool | True |
Indicates whether the current user has permission to disable the auto-merge feature for this pull request. | |
ViewerCanEnableAutoMerge | Bool | True |
Shows whether the current user has permission to enable the auto-merge feature for this pull request. | |
ViewerCanMergeAsAdmin | Bool | True |
Specifies whether the current user can override branch protections and merge the pull request immediately as an administrator. | |
ViewerCanUpdate | Bool | True |
Indicates whether the current user can modify details of the pull request, such as its title or description. | |
ViewerCanUpdateBranch | Bool | True |
Shows whether the current user can update the pull request's head branch by merging or rebasing the base branch. | |
ViewerCannotUpdateReasons | String | True |
Lists the reasons why the current user is unable to update this pull request. | |
ViewerLatestReviewRequestId | String | True |
The unique identifier of the latest review request made by the current user for this pull request. | |
ViewerLatestReviewId | String | True |
The unique identifier of the latest review submitted by the current user for this pull request. | |
IsMergeQueueEnabled | Bool | True |
Indicates whether a merge queue is enabled for the pull request's base branch. | |
IsInMergeQueue | Bool | True |
Shows whether this pull request is currently waiting in the merge queue. | |
MergeQueueEntryId | String | True |
The unique identifier for this pull request's entry in the merge queue. | |
MergeQueueEntryJump | Bool | True |
Indicates whether this pull request has been prioritized to jump ahead in the merge queue. | |
MergeQueueEntryPosition | Int | True |
The current position of this pull request in the merge queue. | |
MergeQueueEntrySolo | Bool | True |
Specifies whether this pull request must be merged and deployed independently from other changes. | |
MergeQueueEntryState | String | True |
Represents the current state of this pull request within the merge queue. | |
MergeQueueEntryEnqueuedAt | Datetime | True |
The timestamp of when this pull request was added to the merge queue. | |
MergeQueueEntryEstimatedTimeToMerge | Int | True |
The estimated time, in seconds, until this pull request is expected to be merged from the queue. | |
MergeQueueEntryBaseCommitId | String | True |
The commit ID representing the base commit in the merge queue entry. | |
MergeQueueEntryHeadCommitId | String | True |
The commit ID representing the head commit in the merge queue entry. | |
MergeQueueEntryMergeQueueId | String | True |
The unique identifier for the merge queue that this entry belongs to. | |
MergeQueueEntryMergeQueueUrl | String | True |
The URL providing access to the merge queue entry within the GitHub web interface. | |
MergeQueueEntryMergeQueueResourcePath | String | True |
The API resource path to access the merge queue entry details. | |
MergeQueueEntryMergeQueueNextEntryEstimatedTimeToMerge | Int | True |
The estimated time, in seconds, for the next entry in the merge queue to be merged. | |
StatusCheckRollupId | String | True |
The unique node ID of the StatusCheckRollup object associated with this pull request. | |
StatusCheckRollupCommitId | String | True |
The commit ID linked to the status checks and check runs for this pull request. | |
StatusCheckRollupState | String | True |
The overall status of the pull request's associated checks (for example, 'SUCCESS', 'FAILURE'). |
Pseudo-Columns
疑似カラムは、明示的にリストされているステートメントの型でのみ使用できるフィールドです。これらは標準のカラムではなく、特定の操作のための追加機能を提供するものです。
Name | Type | Description |
AssigneeIds | String |
A comma-separated list of node IDs representing users assigned to this pull request. |
LabelIds | String |
A comma-separated list of node IDs representing labels applied to this pull request. |