Represents all the data associated with a pull request.

interface GitPullRequest {
    _links?: any;
    artifactId?: string;
    autoCompleteSetBy?: IdentityRef;
    closedBy?: IdentityRef;
    closedDate?: Date;
    codeReviewId?: number;
    commits?: GitCommitRef[];
    completionOptions?: GitPullRequestCompletionOptions;
    completionQueueTime?: Date;
    createdBy?: IdentityRef;
    creationDate?: Date;
    description?: string;
    forkSource?: GitForkRef;
    hasMultipleMergeBases?: boolean;
    isDraft?: boolean;
    labels?: WebApiTagDefinition[];
    lastMergeCommit?: GitCommitRef;
    lastMergeSourceCommit?: GitCommitRef;
    lastMergeTargetCommit?: GitCommitRef;
    mergeFailureMessage?: string;
    mergeFailureType?: PullRequestMergeFailureType;
    mergeId?: string;
    mergeOptions?: GitPullRequestMergeOptions;
    mergeStatus?: PullRequestAsyncStatus;
    pullRequestId?: number;
    remoteUrl?: string;
    repository?: GitRepository;
    reviewers?: IdentityRefWithVote[];
    sourceRefName?: string;
    status?: PullRequestStatus;
    supportsIterations?: boolean;
    targetRefName?: string;
    title?: string;
    url?: string;
    workItemRefs?: ResourceRef[];
}

Properties

_links?: any

Links to other related objects.

artifactId?: string

A string which uniquely identifies this pull request. To generate an artifact ID for a pull request, use this template: vstfs:///Git/PullRequestId/{projectId}/{repositoryId}/{pullRequestId}

autoCompleteSetBy?: IdentityRef

If set, auto-complete is enabled for this pull request and this is the identity that enabled it.

closedBy?: IdentityRef

The user who closed the pull request.

closedDate?: Date

The date when the pull request was closed (completed, abandoned, or merged externally).

codeReviewId?: number

The code review ID of the pull request. Used internally.

commits?: GitCommitRef[]

The commits contained in the pull request.

Options which affect how the pull request will be merged when it is completed.

completionQueueTime?: Date

The most recent date at which the pull request entered the queue to be completed. Used internally.

createdBy?: IdentityRef

The identity of the user who created the pull request.

creationDate?: Date

The date when the pull request was created.

description?: string

The description of the pull request.

forkSource?: GitForkRef

If this is a PR from a fork this will contain information about its source.

hasMultipleMergeBases?: boolean

Multiple mergebases warning

isDraft?: boolean

Draft / WIP pull request.

The labels associated with the pull request.

lastMergeCommit?: GitCommitRef

The commit of the most recent pull request merge. If empty, the most recent merge is in progress or was unsuccessful.

lastMergeSourceCommit?: GitCommitRef

The commit at the head of the source branch at the time of the last pull request merge.

lastMergeTargetCommit?: GitCommitRef

The commit at the head of the target branch at the time of the last pull request merge.

mergeFailureMessage?: string

If set, pull request merge failed for this reason.

mergeFailureType?: PullRequestMergeFailureType

The type of failure (if any) of the pull request merge.

mergeId?: string

The ID of the job used to run the pull request merge. Used internally.

Options used when the pull request merge runs. These are separate from completion options since completion happens only once and a new merge will run every time the source branch of the pull request changes.

The current status of the pull request merge.

pullRequestId?: number

The ID of the pull request.

remoteUrl?: string

Used internally.

repository?: GitRepository

The repository containing the target branch of the pull request.

reviewers?: IdentityRefWithVote[]

A list of reviewers on the pull request along with the state of their votes.

sourceRefName?: string

The name of the source branch of the pull request.

The status of the pull request.

supportsIterations?: boolean

If true, this pull request supports multiple iterations. Iteration support means individual pushes to the source branch of the pull request can be reviewed and comments left in one iteration will be tracked across future iterations.

targetRefName?: string

The name of the target branch of the pull request.

title?: string

The title of the pull request.

url?: string

Used internally.

workItemRefs?: ResourceRef[]

Any work item references associated with this pull request.