Set GitHubRepository - X-Guardian/PowerShellForGitHub GitHub Wiki

Set-GitHubRepository

SYNOPSIS

Updates the details of an existing repository on GitHub.

SYNTAX

Elements (Default)

Set-GitHubRepository [-OwnerName <String>] [-RepositoryName <String>] [-NewName <String>]
 [-Description <String>] [-Homepage <String>] [-DefaultBranch <String>] [-Private] [-NoIssues] [-NoProjects]
 [-NoWiki] [-DisallowSquashMerge] [-DisallowMergeCommit] [-DisallowRebaseMerge] [-DeleteBranchOnMerge]
 [-IsTemplate] [-Archived] [-Force] [-AccessToken <String>] [-NoStatus] [-WhatIf] [-Confirm]
 [<CommonParameters>]

Uri

Set-GitHubRepository -Uri <String> [-NewName <String>] [-Description <String>] [-Homepage <String>]
 [-DefaultBranch <String>] [-Private] [-NoIssues] [-NoProjects] [-NoWiki] [-DisallowSquashMerge]
 [-DisallowMergeCommit] [-DisallowRebaseMerge] [-DeleteBranchOnMerge] [-IsTemplate] [-Archived] [-Force]
 [-AccessToken <String>] [-NoStatus] [-WhatIf] [-Confirm] [<CommonParameters>]

DESCRIPTION

Updates the details of an existing repository on GitHub.

The Git repo for this module can be found here: http://aka.ms/PowerShellForGitHub

EXAMPLES

EXAMPLE 1

Set-GitHubRepository -OwnerName microsoft -RepositoryName PowerShellForGitHub -Description 'The best way to automate your GitHub interactions'

Changes the description of the specified repository.

EXAMPLE 2

Set-GitHubRepository -Uri https://github.com/PowerShell/PowerShellForGitHub -Private:$false

Changes the visibility of the specified repository to be public.

EXAMPLE 3

Get-GitHubRepository -Uri https://github.com/PowerShell/PowerShellForGitHub |

Set-GitHubRepository -NewName 'PoShForGitHub' -Force

Renames the repository without any user confirmation prompting. This is identical to using Rename-GitHubRepository -Uri https://github.com/PowerShell/PowerShellForGitHub -NewName 'PoShForGitHub' -Confirm:$false

PARAMETERS

-AccessToken

If provided, this will be used as the AccessToken for authentication with the REST Api. Otherwise, will attempt to use the configured value or will run unauthenticated.

Type: System.String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Archived

Specify this to archive this repository. NOTE: You cannot unarchive repositories through the API / this module.

Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultBranch

Update the default branch for this repository.

Type: System.String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DeleteBranchOnMerge

Specifies the automatic deleting of head branches when pull requests are merged.

Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-Description

A short description of the repository.

Type: System.String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DisallowMergeCommit

By default, merging pull requests with a merge commit will be allowed. Specify this to disallow.

Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DisallowRebaseMerge

By default, rebase-merge pull requests will be allowed. Specify this to disallow.

Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DisallowSquashMerge

By default, squash-merging pull requests will be allowed. Specify this to disallow.

Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-Force

If this switch is specified, you will not be prompted for confirmation of command execution when renaming the repository.

Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-Homepage

A URL with more information about the repository.

Type: System.String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IsTemplate

Specifies whether the repository is made available as a template.

Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-NewName

Rename the repository to this new name.

Type: System.String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NoIssues

By default, this repository will support Issues. Specify this to disable Issues.

Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-NoProjects

By default, this repository will support Projects. Specify this to disable Projects. If you're creating a repository in an organization that has disabled repository projects, this will be true by default.

Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-NoStatus

If this switch is specified, long-running commands will run on the main thread with no commandline status update. When not specified, those commands run in the background, enabling the command prompt to provide status information. If not supplied here, the DefaultNoStatus configuration property value will be used.

Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-NoWiki

By default, this repository will have a Wiki. Specify this to disable the Wiki.

Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-OwnerName

Owner of the repository. If not supplied here, the DefaultOwnerName configuration property value will be used.

Type: System.String
Parameter Sets: Elements
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Private

Specify this to make the repository private. To change a repository to be public, specify -Private:$false

Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-RepositoryName

Name of the repository. If not supplied here, the DefaultRepositoryName configuration property value will be used.

Type: System.String
Parameter Sets: Elements
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Uri

Uri for the repository. The OwnerName and RepositoryName will be extracted from here instead of needing to provide them individually.

Type: System.String
Parameter Sets: Uri
Aliases: RepositoryUrl

Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases: cf

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases: wi

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

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

INPUTS

GitHub.Branch

GitHub.Content

GitHub.Event

GitHub.Issue

GitHub.IssueComment

GitHub.Label

GitHub.Milestone

GitHub.PullRequest

GitHub.Project

GitHub.ProjectCard

GitHub.ProjectColumn

GitHub.Release

GitHub.Repository

OUTPUTS

GitHub.Repository

NOTES

RELATED LINKS

⚠️ **GitHub.com Fallback** ⚠️