Pull Request Properties - List
获取拉取请求的外部属性。
GET https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/properties?api-version=7.1
URI 参数
名称 | 在 | 必需 | 类型 | 说明 |
---|---|---|---|---|
organization
|
path | True |
string |
Azure DevOps 组织的名称。 |
pull
|
path | True |
integer (int32) |
拉取请求的 ID。 |
repository
|
path | True |
string |
拉取请求的目标分支的存储库 ID。 |
project
|
path |
string |
项目 ID 或项目名称 |
|
api-version
|
query | True |
string |
要使用的 API 版本。 这应设置为“7.1”才能使用此版本的 API。 |
响应
名称 | 类型 | 说明 |
---|---|---|
200 OK |
成功作 |
安全性
oauth2
类型:
oauth2
流向:
accessCode
授权 URL:
https://app.vssps.visualstudio.com/oauth2/authorize&response_type=Assertion
令牌 URL:
https://app.vssps.visualstudio.com/oauth2/token?client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer&grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer
作用域
名称 | 说明 |
---|---|
vso.code | 授予读取有关提交、更改集、分支和其他版本控制项目的源代码和元数据的能力。 此外,还可以通过服务挂钩搜索代码并获取有关版本控制事件的通知。 |
示例
示例请求
GET https://dev.azure.com/fabrikam/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/properties?api-version=7.1
示例响应
{
"count": 4,
"value": {
"Microsoft.Git.PullRequest.SourceRefName": {
"$type": "System.String",
"$value": "refs/heads/vsts-api-sample/taste-page-level"
},
"Microsoft.Git.PullRequest.TargetRefName": {
"$type": "System.String",
"$value": "refs/heads/master"
},
"sampleId": {
"$type": "System.String",
"$value": "8"
},
"startedDateTime": {
"$type": "System.DateTime",
"$value": "2017-09-25T15:26:43.667Z"
}
}
}
定义
PropertiesCollection
类将属性包表示为键值对的集合。 接受除 DBNull
以外的所有基元类型(具有 TypeCode != TypeCode.Object
的任何类型)的值。 Byte[]、Int32、Double、DateType 和 String 类型的值将保留其类型,其他基元将重新调整为 String。 Byte[] 应为 base64 编码字符串。
名称 | 类型 | 说明 |
---|---|---|
count |
integer (int32) |
集合中的属性计数。 |
item |
object |
|
keys |
string[] |
集合中的键集。 |
values |
string[] |
集合中的值集。 |