git - Azure Devops Rest API - 使用 PAT 时创建拉取请求所有者问题
问题描述
我正在尝试使用 createdby 选项创建拉取请求,如下面的 JSON 通过 rest api;
{
"createdBy": {"id": "b568ab19-05a8-6199-9bee-95f3b7b994c9"},
"sourceRefName": "refs/heads/hotfixes/hotfix-test-2",
"targetRefName": "refs/heads/master",
"title": "Merge SourceBranch to master",
"description": "This PR Created automatically via REST API, plese do not forget to complete this PR!! ",
"reviewers": [
{
"id": "a048902e-aa3b-62ac-9407-baff1ba594fb",
"isRequired": "true"
}
]
}
但是 API 方法无法在 createdBy 区域处理我的用户 ID。Api 似乎在此区域使用个人访问令牌所有者。因为我使用 api 创建的所有拉取请求都具有相同的令牌所有者。请注意,api 可以真实地在审阅者区域获取此用户 id。
有没有人知道这种行为的细节?
这里是关于创建拉取请求的 API 参考;
解决方案
推荐阅读
- sql - 在 CREATE VIEW 内的 WITH...AS 中使用多个表表达式时出现“找不到对象”错误
- android - Java 函数 .asBytes() 的 Kotlin 等价物是什么?
- json - 在 VS2019 中获取“找不到方法:'Boolean Newtonsoft.Json.Schema.SchemaExtensions.IsValid”
- javascript - 使用一个组件来渲染每个 Vuetify 扩展面板项
- c# - 剑道图表 - 显示当前列值与前一列值之间的列差异
- c# - 如何获取 XML 响应的值列表?
- windows-community-toolkit - 在 UWP DataGrid 中对数据进行分组
- sql - hive sql - 如何选择 hive 数组列中的前 n 个元素并返回所选数组
- python - 如何在连接和排序后显示初始值数组
- rust - 为什么在执行时未执行从 Future::poll() 调用的 async fn()?