Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Documentation on well-known actor_id values?

未关闭
#4,406 6 条评论 12 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
58/100
Issue 类型
文档
描述清晰度
基本清楚
活跃度
活跃
技术栈
github, openapi
领域
api, documentation

调研方向

从 GitHub REST API 的 rulesets 端点及其链接文档开始,重点关注 bypass_actors.actor_id 和 actor_type。验证哪些已知值是稳定且适用的,然后记录已确认的值,例如 OrganizationAdmin 和 DeployKey;如果支持,也记录 repository admin。完成标准是 API 描述或文档清楚列出这些值及其适用性。

由索引模型根据 Issue 内容生成。

描述

documentation

Coming over from https://docs.github.com/en/rest/repos/rules?apiVersion=2022-11-28#create-a-repository-ruleset--fine-grained-access-tokens > bypass_actors > actor_id:

The ID of the actor that can bypass a ruleset. If actor_type is OrganizationAdmin, this should be 1. If actor_type is DeployKey, this should be nullOrganizationAdmin is not applicable for personal repositories.

That's a good and helpful start on known actor_id values. But there seem to be other well-known -or at least well-defined- values in play. For example, I've found across all repositories I've checked that the Repository admin role is 5.

Is there documentation somewhere on what those well-known actor_id values are? If not, could that be created please?

Context: this is useful for automating creation of branch rulesets. If someone wants to, say, create a standard branch protection for their default branch that exempts repo admins, they'll need to have the actor_id for bypass_actors. Pinging the GitHub API to fetch an ID that's always set to the same value would be extra complexity and time.

主要语言
没有语言数据
星标
1.6k
派生
342
平均合并
2 小时 23 分钟
30 天内合并 PR
57

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

github/rest-api-description 的其他 Issue

查看 github/rest-api-description 的全部 Issue

相似的 Issue

更多 Backend & API Design Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。