Skip to content

feat: Add EnterpriseOwner as bypass actor type for rulesets#3487

Open
nitinjain999 wants to merge 1 commit into
integrations:mainfrom
nitinjain999:feat/enterprise-owner-bypass-actor
Open

feat: Add EnterpriseOwner as bypass actor type for rulesets#3487
nitinjain999 wants to merge 1 commit into
integrations:mainfrom
nitinjain999:feat/enterprise-owner-bypass-actor

Conversation

@nitinjain999

@nitinjain999 nitinjain999 commented Jun 11, 2026

Copy link
Copy Markdown

Closes #3210
Supersedes #3211

Picking up from @jackmtpt who did the initial work in #3211.

The issue is straightforward — EnterpriseOwner was missing from the actor_type validation list in both github_organization_ruleset and github_repository_ruleset, so using it would fail with a validation error even though the GitHub API supports it fine.

Changes:

  • Add EnterpriseOwner to the actor_type allowlist in both resources
  • Update actor_id description to note it should be left unset for OrganizationAdmin, EnterpriseOwner, and DeployKey — the API ignores it for those types
  • Remove actor_id = 1 from OrganizationAdmin blocks in existing tests (flagged by @deiga — same deal, API ignores it)
  • New acceptance tests for EnterpriseOwner bypass, enterprise-gated with skipUnlessEnterprise and using ConfigStateChecks
  • Docs updated in docs/resources/website/docs/ no longer exists on main

Tested against a live enterprise org. Create, plan (no drift on second run), destroy all worked. One thing to flag: the API returns actor_id: 0 for EnterpriseOwner on read, so if you expose bypass_actors as an output you'll see a null → 0 change on the first plan after apply. Resource itself has no diff though — same behaviour as OrganizationAdmin.

- Add EnterpriseOwner to the ValidateDiagFunc allowlist for actor_type
  in both organization and repository ruleset resources
- Update actor_id descriptions to clarify it should be omitted for
  OrganizationAdmin, EnterpriseOwner, and DeployKey (API ignores it)
- Remove actor_id=1 from OrganizationAdmin bypass_actors in tests since
  the GitHub API ignores the value for that actor type
- Add separate enterprise-gated acceptance tests for EnterpriseOwner
  bypass actor using ConfigStateChecks (skipUnlessEnterprise)
- Update docs/resources/ (new docs system) for both resources

Closes integrations#3210
@github-actions

Copy link
Copy Markdown

👋 Hi, and thank you for this contribution!

This repo is maintained by GitHub and community members on a best-effort basis. We'll get to this as soon as we can.

You can help us prioritize by joining the discussion on open issues and PRs, sharing details on the changes you need, and reviewing other contributions.


🤖 This is an automated message.

@github-actions github-actions Bot added the Type: Feature New feature or request label Jun 11, 2026
@nitinjain999 nitinjain999 marked this pull request as ready for review June 11, 2026 19:28
@nitinjain999 nitinjain999 marked this pull request as draft June 11, 2026 19:32
@nitinjain999 nitinjain999 marked this pull request as ready for review June 11, 2026 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: Feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT]: Support EnterpriseOwner actor_type

1 participant