从命令行在Bitbucket上创建请求请求 [英] Create a Pull Request on Bitbucket from the command line
本文介绍了从命令行在Bitbucket上创建请求请求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否有git命令创建拉动请求按下分支时直接在Bitbucket上显示?
Is there a git command to create a Pull Request directly on Bitbucket when pushing a Branch?
或其他直接从命令行或PHP在Bitbucket上创建Pull Request的方法
Or any other way to create Pull Request on Bitbucket directly from the command line or PHP
推荐答案
您可以使用在此线程中:
You could use the BitBucket API and POST the right command, 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"}}}}
这篇关于从命令行在Bitbucket上创建请求请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文