我已经安装好了Stash pullrequest builder plugin
。通过阅读官方介绍,此插件可用于构建Pull Request 。
但是我想知道这个插件是否会在stash上创建一个特定的Pull Request 。如果没有,我如何通过其他插件或命令行创建或在存储中手动创建?
您可以使用Stash REST API通过命令行创建请求请求。
您必须向该网址发送json发布请求:
/rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests
Curl的示例:
curl -u your_stash_user:your_stash_password -H "Content-Type: application/json" -X POST -d '{JSON CONTENT}' http://your_stash_url/rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests
Json文件(从Atlassian文档中复制):
{
"title": "Talking Nerdy",
"description": "It’s a kludge, but put the tuple from the database in the cache.",
"state": "OPEN",
"open": true,
"closed": false,
"fromRef": {
"id": "refs/heads/feature-ABC-123",
"repository": {
"slug": "my-repo",
"name": null,
"project": {
"key": "PRJ"
}
}
},
"toRef": {
"id": "refs/heads/master",
"repository": {
"slug": "my-repo",
"name": null,
"project": {
"key": "PRJ"
}
}
},
"locked": false,
"reviewers": [
{
"user": {
"name": "charlie"
}
}
]
}
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句