feat: add github_enterprise_private_repository_forking_setting resource#3361
feat: add github_enterprise_private_repository_forking_setting resource#3361andrewesweet wants to merge 4 commits intointegrations:mainfrom
Conversation
Add a new resource to manage the enterprise-level policy that controls whether and where members can fork private and internal repositories. This uses the GraphQL mutation updateEnterpriseAllowPrivateRepositoryForkingSetting to set: - setting_value: ENABLED, DISABLED, or NO_POLICY - policy_value: controls fork destinations (e.g. SAME_ORGANIZATION, ENTERPRISE_ORGANIZATIONS_USER_ACCOUNTS, EVERYWHERE, etc.) The resource includes CustomizeDiff validation ensuring policy_value is required when enabled and forbidden otherwise. Delete resets to NO_POLICY, returning control to individual organizations. Relates to integrations#2851, integrations#1844 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday! We have a process in place for prioritizing and responding to your input. Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labeled with |
…ng tests Add testAccEnterpriseForkingSettingConfig() and testAccEnterpriseForkingSettingCheck() helpers plus a const for the resource address. Reduces test file by ~40% while preserving all 8 test cases and their readability. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Use "This resource allows you to..." voice (matches all enterprise resources) - Use "Creates and manages" in frontmatter description - Move admin access note to inline text (matches enterprise_actions_permissions) - Add empty "Attributes Reference" section (matches enterprise_security_analysis_settings) - Remove ~> callout for destroy note (no precedent in enterprise resource docs) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Design note: schema shapeI considered collapsing I dropped the |
The _value suffix is redundant — every attribute is a value. Shorter names improve readability without losing clarity. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Resolves #3363
Relates to #2851, #1844
Before the change?
After the change?
github_enterprise_private_repository_forking_settingthat manages the enterprise-wide fork policy via theupdateEnterpriseAllowPrivateRepositoryForkingSettingGraphQL mutation.setting(ENABLED,DISABLED,NO_POLICY) andpolicy(6 destination options includingENTERPRISE_ORGANIZATIONS_USER_ACCOUNTSfor EMU environments).CustomizeDiffvalidation, import support, and full acceptance test suite (8 tests all passing).NO_POLICY, returning control to individual organizations.Example usage
Pull request checklist
Does this introduce a breaking change?