feat: Add EnterpriseOwner as bypass actor type for rulesets#3487
Open
nitinjain999 wants to merge 1 commit into
Open
feat: Add EnterpriseOwner as bypass actor type for rulesets#3487nitinjain999 wants to merge 1 commit into
nitinjain999 wants to merge 1 commit into
Conversation
- 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
|
👋 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. |
1 task
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #3210
Supersedes #3211
Picking up from @jackmtpt who did the initial work in #3211.
The issue is straightforward —
EnterpriseOwnerwas missing from theactor_typevalidation list in bothgithub_organization_rulesetandgithub_repository_ruleset, so using it would fail with a validation error even though the GitHub API supports it fine.Changes:
EnterpriseOwnerto theactor_typeallowlist in both resourcesactor_iddescription to note it should be left unset forOrganizationAdmin,EnterpriseOwner, andDeployKey— the API ignores it for those typesactor_id = 1fromOrganizationAdminblocks in existing tests (flagged by @deiga — same deal, API ignores it)EnterpriseOwnerbypass, enterprise-gated withskipUnlessEnterpriseand usingConfigStateChecksdocs/resources/—website/docs/no longer exists on mainTested against a live enterprise org. Create, plan (no drift on second run), destroy all worked. One thing to flag: the API returns
actor_id: 0forEnterpriseOwneron read, so if you exposebypass_actorsas an output you'll see anull → 0change on the first plan after apply. Resource itself has no diff though — same behaviour asOrganizationAdmin.