cnb-rs group collaborator
cnb-rs group collaborator <subcommand>组织外部贡献者管理子组。外部贡献者是不属于组织正式成员、但被授予某些仓库访问权限的用户。API endpoint 在组织级(/{group}/-/outside-collaborators),所以放在 group 子组而非 repo 子组下。
子命令
- cnb-rs group collaborator list — 列出组织外部贡献者
- cnb-rs group collaborator update — 更新外部贡献者权限
- cnb-rs group collaborator remove — 移除外部贡献者(alias
rm)
与组织正式成员的区别
| 维度 | 正式成员(group member) | 外部贡献者(group collaborator) |
|---|---|---|
| 入口 | cnb-rs group member ... | cnb-rs group collaborator ... |
| API endpoint | /{group}/-/members/* | /{group}/-/outside-collaborators/* |
| 作用 | 组织全部仓库 | 通常只对某个 / 某些仓库 |
| 是否计组织成员数 | 是 | 否 |
| 仓库视角下 | repo member list 含他们 | 同 repo member all 时会含 |
如果只想让某用户访问某一个仓库,用 cnb-rs repo member add <USER> --outside-collaborator 更直接(后者是仓库视角的便捷入口,本质同样会出现在 group collaborator list 里)。
示例
bash
# 列出组织外部贡献者
cnb-rs group collaborator list wwvo
# 升级 alice 为 Master
cnb-rs group collaborator update wwvo alice --role Master
# 移除(默认弹 confirm)
cnb-rs group collaborator rm wwvo alice -y另请参阅
- cnb-rs group
- cnb-rs group member — 组织正式成员管理
- cnb-rs repo member — 仓库视角成员管理