gpt4 book ai didi

git - 从命令行在 Bitbucket 上创建 pull 请求

转载 作者:行者123 更新时间:2023-12-04 12:42:52 27 4
gpt4 key购买 nike

是否有 git 命令来创建 Pull Request推送分支时直接在Bitbucket上?

或者直接从命令行或 PHP 在 Bitbucket 上创建 pull 请求的任何其他方式

最佳答案

您可以使用 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"}}}}

关于git - 从命令行在 Bitbucket 上创建 pull 请求,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52089429/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com