Pullrequest到Bitbucket

时间:2019-06-04 02:21:19

标签: bash git bitbucket

我希望将请求请求发送到bitbucket中的多个审阅者。目前,我有以下json和curl请求

{
    "title": "PR-Test",
    "source": {
        "branch": {
            "name": "master"
        }
    },
    "destination": {
        "branch": {
            "name": "prd"
        }
    },

    "reviewers": [
        {

            "uuid": "{d543251-6455-4113-b4e4-2fbb1tb260}"
        }

    ],

    "close_source_branch": true

}

curl -u "user:pass" -H "Content-Type: application/json" https://api.bitbucket.org/2.0/repositories/companyname/my-repo/pullrequests -X POST --data @my-pr.json

以上curl命令起作用。我需要json语法在审阅者列表中传递多个用户名或多个UUID。

https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Busername%7D/%7Brepo_slug%7D/pullrequests

1 个答案:

答案 0 :(得分:1)

您链接到的文档似乎表明应该可以进行以下操作:

[JsonObject(NamingStrategyType = typeof(CamelCaseNamingStrategy))]
public class Person
{

}