GitPullRequest interface
Represents all the data associated with a pull request.
Properties
artifact |
A string which uniquely identifies this pull request. To generate an artifact ID for a pull request, use this template: |
auto |
If set, auto-complete is enabled for this pull request and this is the identity that enabled it. |
closed |
The user who closed the pull request. |
closed |
The date when the pull request was closed (completed, abandoned, or merged externally). |
code |
The code review ID of the pull request. Used internally. |
commits | The commits contained in the pull request. |
completion |
Options which affect how the pull request will be merged when it is completed. |
completion |
The most recent date at which the pull request entered the queue to be completed. Used internally. |
created |
The identity of the user who created the pull request. |
creation |
The date when the pull request was created. |
description | The description of the pull request. |
fork |
If this is a PR from a fork this will contain information about its source. |
has |
Multiple mergebases warning |
ignore |
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). |
is |
Draft / WIP pull request. |
labels | The labels associated with the pull request. |
last |
The commit of the most recent pull request merge. If empty, the most recent merge is in progress or was unsuccessful. |
last |
The commit at the head of the source branch at the time of the last pull request merge. |
last |
The commit at the head of the target branch at the time of the last pull request merge. |
merge |
If set, pull request merge failed for this reason. |
merge |
The type of failure (if any) of the pull request merge. |
merge |
The ID of the job used to run the pull request merge. Used internally. |
merge |
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. |
merge |
The current status of the pull request merge. |
pull |
The ID of the pull request. |
remote |
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. |
source |
The name of the source branch of the pull request. |
status | The status of the pull request. |
supports |
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. |
target |
The name of the target branch of the pull request. |
title | The title of the pull request. |
url | Used internally. |
work |
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
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
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
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[]