Repository navigation
feat: add github_enterprise_private_repository_forking_setting resource - #3361
andrewesweet wants to merge 4 commits into
Conversation
|
👋 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 |
Design note: schema shapeI considered collapsing I dropped the |
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) <[email protected]>
…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) <[email protected]>
- 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) <[email protected]>
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) <[email protected]>
2c6c045 to
ba25949
Compare
|
Thanks for putting this PR together and taking the time to contribute! We're temporarily moving to an issue-first model (see CONTRIBUTING.md) where only collaborators can open PRs while we work through the backlog. Because of that, I'm going to close this PR for now. I've linked it on #3363 so we don't lose your work or context when we pick that issue up. Feel free to add a 👍 or any extra notes there to help us prioritize it. |
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?