Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation on well-known actor_id values? #4406

Open
JoshuaKGoldberg opened this issue Dec 21, 2024 · 0 comments
Open

Documentation on well-known actor_id values? #4406

JoshuaKGoldberg opened this issue Dec 21, 2024 · 0 comments

Comments

@JoshuaKGoldberg
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants