问题描述
有什么方法可以使用BB的API分叉存储库?
There's any way to fork a repository using BB's API?
根据我对API文档的阅读,没有任何明确的文档: https://confluence.atlassian.com/display/BITBUCKET/Repositories
From what I've read on the API's docs, there isn't any explicit one: https://confluence.atlassian.com/display/BITBUCKET/Repositories
我的想法是创建一个新的存储库,并指出它是另一个存储库的分支,因此我可以稍后创建拉取请求.
My idea is to create a new repo and point that it's a fork of another one, so I can create pull requests later.
推荐答案
您可以使用API通过基本授权或OAuth派生存储库.
You can use the API to fork a repository, either using Basic authorization or OAuth.
分叉存储库的方法:
使用带有所需帖子数据名称"的授权POST请求. https://bitbucket.org/api/1.0/repositories/ {帐户名}/{repo_slug}/fork/
Using a authorized POST-request with required post data "name".https://bitbucket.org/api/1.0/repositories/{accountname}/{repo_slug}/fork/
此处带有可选参数的完整文档: http://restbrowser.bitbucket.org/
Full documentation with optional parameters here:http://restbrowser.bitbucket.org/
这篇关于使用BitBucket的API派生存储库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!