pull_requests

A unified table of your pull request data from various source control systems.

id

Primary key
Unique ID for the row.

additions

number
The number of lines added in the pull request.

base_ref

string
The name of the branch that the changes are being merged into.

bot_authored

boolean
Boolean indicating if the user is a bot. Also known as "Machine User".

bot_name

string
The name of the bot user that generated the PR when bot authored.

bot_type

string
The source-specific type of bot user that generated the PR when bot authored.

closed

date
The date that the pull request was closed in the source system.

created

date
The date that the pull request was created in the source system.

deletions

number
The number of lines deleted in the pull request.

dx_versioned_team_member_id

Foreign key
The dx_versioned_team_members ID of the owner's team membership when the PR was created.

dx_user_id

Foreign key
The dx_users ID of the user that owns the pull request.

external_url

string
The URL to the pull request details in the source system.

external_id

Foreign key
The ID used by the source system.

head_ref

string
The name of the branch that the changes are coming from.

merge_commit_sha

string
Merge Commit SHA from the source system

squashed_commit_shas

array
Full SHAs of the original source branch commits that a squash merge replaced. Used only for AI code metrics; pull request commits, commit counts, and cycle time metrics use the squash commit. Populated for Bitbucket Cloud only; null for other sources and for pull requests that have not been checked yet; empty when a pull request was checked and there are no original commits to add, because it was not squash merged or its original commits could not be recovered.

rebased_commit_originals

jsonb
Maps each pull request commit that was rebased while the pull request was open (for example by a merge queue, branch sync, or "Update branch") to the commit it replaced. Keys are full SHAs of current pull request commits. Each value has "original_sha" (the first commit in the rewrite chain), "previous_sha" (the commit it most recently replaced), and "patch_id" (the stable git patch ID that matched them). Used only for AI code metrics, so a rebased commit can use its original commit's AI code data. Populated for GitHub and Bitbucket Cloud (merged pull requests only); null for other sources and when no rebased commits have been recorded for the pull request.

merged_by_user_id

Foreign key
The dx_users ID of the user that merged the pull request.

merged

date
The date that the pull request was merged in the source system.

open_to_first_approval

number
The time difference in seconds between a pull request being approved and ready for review.

open_to_first_approval_business_hours

number
The time difference in seconds between a pull request being approved and ready for review during business hours (M-F 8am - 6pm). Uses the author's timezone, if linked. If not it uses the default timezone of the account.

open_to_first_review

number
The time difference in seconds between the first review being submitted and the pull request ready for review.

open_to_first_review_business_hours

number
The time difference in seconds between the first review being submitted and the pull request ready for review during business hours (M-F 8am - 6pm). the author's timezone, if linked. If not it uses the default timezone of the account.

open_to_merge

number
The time difference in seconds between the pull request being merged and ready for review.

open_to_merge_business_hours

number
The time difference in seconds between the pull request being merged and ready for review during business hours (M-F 8am - 6pm). the author's timezone, if linked. If not it uses the default timezone of the account.

ready_for_review_at

date
The date that a pull request was marked ready for review (put in open state).

tz

string
The timezone used to calculate business hours.

weight

number
Weight of the pull request.

classification

string
Classification of the pull request.

draft

boolean
Boolean indicating if the pull request is a draft.

reverted

boolean
Boolean indicating if the pull request was reverted.

ai_attributes_set_by

string
User that set AI attributes.

ai_attributes_set_at

date
Date/time when AI attributes were set.

repo_id

Foreign key
The unique ID for the repo that owns the pull request

source

string
The name of the system that the pull request originated from.

source_table_id

Foreign key
The unique ID for the row in the source table that this pull request originated from.

source_table_repo_id

Foreign key
The unique ID for the row in the source specific repository/project table that this pull request relates to.

title

string
The title or summary of the pull request

updated

date
The date that the pull request was last updated in the source system.

deleted

boolean
Boolean indicating if the pull request has been deleted.