Skip to content

Documentation on well-known actor_id values? #4406

Open
@JoshuaKGoldberg

Description

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.

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions