通过 API 合并 bitbucket 拉取请求
Merging bitbucket pull request via API
根据 Bitbucket API documentation,我应该能够将带有 POST 的拉取请求合并到此 url:
https://bitbucket.example.com/rest/api/1.0/projects/{projectkey}/repos/{repositoryslug}/pull-requests/{pullrequestid}/merge?version
然而,每当我尝试时,我都会收到回复 409 Conflict
并且在回复中包含以下内容:
"message": "You are attempting to modify a pull request based on out-of-date information.",
"currentVersion": 0,
"expectedVersion": -1,
我尝试传递 0
作为版本号,-1
作为版本号,完全省略版本号 - 结果总是一样的。我怎样才能让它合并?
根据 Bitbucket API documentation,我应该能够将带有 POST 的拉取请求合并到此 url:
https://bitbucket.example.com/rest/api/1.0/projects/{projectkey}/repos/{repositoryslug}/pull-requests/{pullrequestid}/merge?version
然而,每当我尝试时,我都会收到回复 409 Conflict
并且在回复中包含以下内容:
"message": "You are attempting to modify a pull request based on out-of-date information.",
"currentVersion": 0,
"expectedVersion": -1,
我尝试传递 0
作为版本号,-1
作为版本号,完全省略版本号 - 结果总是一样的。我怎样才能让它合并?