Octri

sdk repos

列出每种语言的 GitHub 仓库:暂存位置、发布位置、分支和状态。生成的 SDK 会先推送到暂存仓库,然后再从那里发布到生产环境。

bash
octri sdk repos [list | init <language>]

octri sdk repos init <language>

设置一种语言的暂存和发布位置。每个仓库都需要所有者、名称和分支。

参数

<language>string必填

语言 ID。也可以使用 --lang。

标志

--staging-owner <owner>string必填

暂存仓库的所有者,可以是用户或组织。

--staging-repo <repo>string必填

暂存仓库的名称。

--staging-branch <branch>string必填

要推送到的分支。

--production-owner <owner>string必填

生产仓库的所有者。

--production-repo <repo>string必填

生产仓库的名称。

--production-branch <branch>string必填

发布所用的分支。

示例

列出仓库

bash
octri sdk repos
Output
✔ Loading SDK repos

SDK repositories
  No per-language repositories linked.

设置 Go 仓库

bash
octri sdk repos init go \
  --staging-owner acme --staging-repo acme-go-staging --staging-branch main \
  --production-owner acme --production-repo acme-go --production-branch main
  • octri sdk publish:将构建生成的软件包发布到 npm、PyPI 和其他注册表。
  • octri github status:显示已连接的仓库、分支、规范文件路径以及上次同步时间。