更新 Evan Priestley 的回答:API 方法已更改为diffusion.repository.edit
.
开发人员文档在此处解释了如何创建和激活存储库。从该文件复制:
创建一个仓库:
$ echo '{
"transactions": [
{
"type": "vcs",
"value": "git"
},
{
"type": "name",
"value": "Poetry"
}
]
}' | arc call-conduit diffusion.repository.edit
使用来自第一个响应的事务 ID 设置远程 URL(如果需要):
$ echo '{
"transactions": [
{
"type": "repository",
"value": "PHID-REPO-7vm42oayez2rxcmpwhuv"
},
{
"type": "uri",
"value": "https://github.com/epriestley/poems.git"
},
{
"type": "io",
"value": "observe"
}
]
}' | arc call-conduit diffusion.uri.edit
激活回购:
$ echo '{
"objectIdentifier": "PHID-REPO-7vm42oayez2rxcmpwhuv",
"transactions": [
{
"type": "status",
"value": "active"
}
]
}' | arc call-conduit diffusion.repository.edit
所有有效参数的列表可在 Web UI 中找到/conduit/method/diffusion.repository.edit/
。