GitPullRequest interface

Represents all the data associated with a pull request.

Properties

artifactId

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

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

closedBy

The user who closed the pull request.

closedDate

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

codeReviewId

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

commits

The commits contained in the pull request.

completionOptions

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

completionQueueTime

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

createdBy

The identity of the user who created the pull request.

creationDate

The date when the pull request was created.

description

The description of the pull request.

forkSource

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

hasMultipleMergeBases

Multiple mergebases warning

ignoreTargetRefAndChooseDynamically

This optional parameter allows clients to use server-side dynamic choices for the target ref. Due to preexisting contracts, users must specify a target ref, but this option will cause the server to ignore it and choose dynamically from the user's favorites (or the default branch).

isDraft

Draft / WIP pull request.

labels

The labels associated with the pull request.

lastMergeCommit

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

lastMergeSourceCommit

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

lastMergeTargetCommit

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

mergeFailureMessage

If set, pull request merge failed for this reason.

mergeFailureType

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

mergeId

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

mergeOptions

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.

mergeStatus

The current status of the pull request merge.

pullRequestId

The ID of the pull request.

remoteUrl

Used internally.

repository

The repository containing the target branch of the pull request.

reviewers

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

sourceRefName

The name of the source branch of the pull request.

status

The status of the pull request.

supportsIterations

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

The name of the target branch of the pull request.

title

The title of the pull request.

url

Used internally.

workItemRefs

Any work item references associated with this pull request.

Property Details

artifactId

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}

artifactId: string

Property Value

string

autoCompleteSetBy

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

autoCompleteSetBy: IdentityRef

Property Value

closedBy

The user who closed the pull request.

closedBy: IdentityRef

Property Value

closedDate

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

closedDate: Date

Property Value

Date

codeReviewId

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

codeReviewId: number

Property Value

number

commits

The commits contained in the pull request.

commits: GitCommitRef[]

Property Value

completionOptions

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

completionOptions: GitPullRequestCompletionOptions

Property Value

completionQueueTime

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

completionQueueTime: Date

Property Value

Date

createdBy

The identity of the user who created the pull request.

createdBy: IdentityRef

Property Value

creationDate

The date when the pull request was created.

creationDate: Date

Property Value

Date

description

The description of the pull request.

description: string

Property Value

string

forkSource

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

forkSource: GitForkRef

Property Value

hasMultipleMergeBases

Multiple mergebases warning

hasMultipleMergeBases: boolean

Property Value

boolean

ignoreTargetRefAndChooseDynamically

This optional parameter allows clients to use server-side dynamic choices for the target ref. Due to preexisting contracts, users must specify a target ref, but this option will cause the server to ignore it and choose dynamically from the user's favorites (or the default branch).

ignoreTargetRefAndChooseDynamically: boolean

Property Value

boolean

isDraft

Draft / WIP pull request.

isDraft: boolean

Property Value

boolean

labels

The labels associated with the pull request.

labels: WebApiTagDefinition[]

Property Value

lastMergeCommit

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

lastMergeCommit: GitCommitRef

Property Value

lastMergeSourceCommit

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

lastMergeSourceCommit: GitCommitRef

Property Value

lastMergeTargetCommit

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

lastMergeTargetCommit: GitCommitRef

Property Value

mergeFailureMessage

If set, pull request merge failed for this reason.

mergeFailureMessage: string

Property Value

string

mergeFailureType

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

mergeFailureType: PullRequestMergeFailureType

Property Value

mergeId

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

mergeId: string

Property Value

string

mergeOptions

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.

mergeOptions: GitPullRequestMergeOptions

Property Value

mergeStatus

The current status of the pull request merge.

mergeStatus: PullRequestAsyncStatus

Property Value

pullRequestId

The ID of the pull request.

pullRequestId: number

Property Value

number

remoteUrl

Used internally.

remoteUrl: string

Property Value

string

repository

The repository containing the target branch of the pull request.

repository: GitRepository

Property Value

reviewers

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

reviewers: IdentityRefWithVote[]

Property Value

sourceRefName

The name of the source branch of the pull request.

sourceRefName: string

Property Value

string

status

The status of the pull request.

status: PullRequestStatus

Property Value

supportsIterations

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.

supportsIterations: boolean

Property Value

boolean

targetRefName

The name of the target branch of the pull request.

targetRefName: string

Property Value

string

title

The title of the pull request.

title: string

Property Value

string

url

Used internally.

url: string

Property Value

string

workItemRefs

Any work item references associated with this pull request.

workItemRefs: ResourceRef[]

Property Value