Skip to content

[FEAT]: Add resource for enterprise private repository forking policy #3363

@andrewesweet

Description

@andrewesweet

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

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions