Set-GitHubActionsPrivateRepoForkPrWorkflowsSettingsOrganization

SYNOPSIS

Set private repo fork PR workflow settings for an organization

SYNTAX

Default (Default)

Set-GitHubActionsPrivateRepoForkPrWorkflowsSettingsOrganization [-Org] <string>
 -RunWorkflowsFromForkPullRequests [-SendWriteTokensToWorkflows] [-SendSecretsAndVariables]
 [-RequireApprovalForForkPrWorkflows] [-Accept <string>] [-WhatIf] [-Confirm]

Body

Set-GitHubActionsPrivateRepoForkPrWorkflowsSettingsOrganization [-Org] <string> -Body <Object>
 [-RunWorkflowsFromForkPullRequests] [-SendWriteTokensToWorkflows] [-SendSecretsAndVariables]
 [-RequireApprovalForForkPrWorkflows] [-Accept <string>] [-WhatIf] [-Confirm]

ALIASES

This cmdlet has the following aliases,

  • Get-GHSetActionsPrivateRepoForkPrWorkflowsSettingsOrganization

DESCRIPTION

The Set-GitHubActionsPrivateRepoForkPrWorkflowsSettingsOrganization cmdlet invokes the PUT method of the /orgs/{org}/actions/permissions/fork-pr-workflows-private-repos endpoint (Set private repo fork PR workflow settings for an organization)

Sets the settings for whether workflows from fork pull requests can run on private repositories in an organization.

Endpoint: PUT /orgs/{org}/actions/permissions/fork-pr-workflows-private-repos API version: 2026-03-10

EXAMPLES

EXAMPLE 1

Set-GitHubActionsPrivateRepoForkPrWorkflowsSettingsOrganization -Org 'github' -RunWorkflowsFromForkPullRequests -Body @{ key = 'value' }

Invokes PUT /orgs/{org}/actions/permissions/fork-pr-workflows-private-repos

EXAMPLE 2

Set-GitHubActionsPrivateRepoForkPrWorkflowsSettingsOrganization -Org 'github' -Body @{ run_workflows_from_fork_pull_requests = $true }

Sends the request body from a hashtable, parameters override the keys of -Body

PARAMETERS

-Accept

The Accept header (media type) of the request Default value: application/vnd.github+json

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Body

The whole request body as a hashtable or object. Keys that are also available as parameters are overwritten by the parameter values

Type: System.Object
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: Body
  Position: Named
  IsRequired: true
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
DefaultValue: ''
SupportsWildcards: false
Aliases:
- cf
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Org

The organization name. The name is not case sensitive.

Path parameter [ org ]

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: 0
  IsRequired: true
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: true
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-RequireApprovalForForkPrWorkflows

Whether workflows triggered by pull requests from forks require approval from a repository administrator to run.

Body property [ require_approval_for_fork_pr_workflows ]

Type: System.Management.Automation.SwitchParameter
DefaultValue: False
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-RunWorkflowsFromForkPullRequests

Whether workflows triggered by pull requests from forks are allowed to run on private repositories.

Required unless -Body is used

Body property [ run_workflows_from_fork_pull_requests ]

Type: System.Management.Automation.SwitchParameter
DefaultValue: False
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: Body
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
- Name: Default
  Position: Named
  IsRequired: true
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-SendSecretsAndVariables

Whether to make secrets and variables available to workflows triggered by pull requests from forks.

Body property [ send_secrets_and_variables ]

Type: System.Management.Automation.SwitchParameter
DefaultValue: False
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-SendWriteTokensToWorkflows

Whether GitHub Actions can create pull requests or submit approving pull request reviews from a workflow triggered by a fork pull request.

Body property [ send_write_tokens_to_workflows ]

Type: System.Management.Automation.SwitchParameter
DefaultValue: False
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-WhatIf

Runs the command in a mode that only reports what would happen without performing the actions.

Type: System.Management.Automation.SwitchParameter
DefaultValue: ''
SupportsWildcards: false
Aliases:
- wi
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

Objects with properties named like the path parameters can be piped to this function

{{ Fill in the Description }}

System.String

{{ Fill in the Description }}

OUTPUTS

The response of the GitHub API (objects

{{ Fill in the Description }}

NOTES

OperationId: actions/set-private-repo-fork-pr-workflows-settings-organization Category: actions / permissions