在推送分支时,是否有git命令直接在Bitbucket上创建Pull Request?
或通过任何其他方法直接从命令行或PHP在Bitbucket上创建Pull Request
答案 0 :(得分:1)
您可以使用BitBucket API并发布正确的命令as in this thread:
POST /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests
也就是说:
curl -u user:myPW -H "Content-Type: application/jso https://bitbucket.server.com/rest/api/1.0/projects/myProject/repos/myRepo/pull-requests -X POST --data @req.json
带有数据:
{"title":"test","description":"test","fromRef":{"id":"refs/heads/test-branch","repository":{"slug":"test-repo","name":null,"project":{"key":"myProject"}}},"toRef":{"id":"refs/heads/master","repository":{"slug":"myRepo","name":null,"project":{"key":"MyProj"}}}}
答案 1 :(得分:0)
您可以通过 curl 使用 Bitbucket pull requests API:
if(exerciseTime[value].timeIntervalSinceNow > 0) {
Text(exerciseTime[value], style:.relative).foregroundColor(.white).font(.largeTitle).padding(.top, 30)
} else {
Text("0 sec").foregroundColor(.white).font(.largeTitle).padding(.top, 30)
}