integrations / integrations/terraform-provider-github
[FEAT]: Add resource for enterprise private repository forking policy
- Dominant language
- Go
- Stars
- 1.2k
- Forks
- 1k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 8
Description
### Describe the need
There is no Terraform resource to manage the enterprise-level private repository forking policy. This policy controls whether and where members can fork private and internal repositories within a GitHub Enterprise.
The GitHub GraphQL API already supports this via the `updateEnterpriseAllowPrivateRepositoryForkingSetting` mutation, which accepts:
- `settingValue`: ENABLED, DISABLED, or NO_POLICY
- `policyValue`: controls fork destinations (SAME_ORGANIZATION, ENTERPRISE_ORGANIZATIONS_USER_ACCOUNTS, EVERYWHERE, etc.)
The `shurcooL/githubv4` Go client already has full type support for this mutation and its enums.
This is particularly important for EMU (Enterprise Managed Users) environments where administrators need to control whether members can fork to their enterprise-managed user accounts.
Relates to #2851 (broader enterprise settings support), #1844 (fork policy reset issue)
### SDK Version
go-github v85, shurcooL/githubv4 v0.0.0-20260209031235
### API Version
GraphQL v4
### Code of Conduct
- [x] I agree to follow this project's Code of Conduct
Contributor guide
Assessment
This issue has not been assessed yet.