GitHubRepositories.ps1
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. function New-GitHubRepository { <# .SYNOPSIS Creates a new repository on GitHub. .DESCRIPTION Creates a new repository on GitHub. The Git repo for this module can be found here: http://aka.ms/PowerShellForGitHub .PARAMETER RepositoryName Name of the repository to be created. .PARAMETER OrganizationName Name of the organization that the repository should be created under. If not specified, will be created under the current user's account. .PARAMETER Description A short description of the repository. .PARAMETER Homepage A URL with more information about the repository. .PARAMETER GitIgnoreTemplate Desired language or platform .gitignore template to apply. For supported values, call Get-GitHubGitIgnore. Values are case-sensitive. .PARAMETER LicenseTemplate Choose an open source license template that best suits your needs. For supported values, call Get-GitHubLicense Values are case-sensitive. .PARAMETER TeamId The id of the team that will be granted access to this repository. This is only valid when creating a repository in an organization. .PARAMETER Private By default, this repository will created Public. Specify this to create a private repository. Creating private repositories requires a paid GitHub account. .PARAMETER NoIssues By default, this repository will support Issues. Specify this to disable Issues. .PARAMETER 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. .PARAMETER NoWiki By default, this repository will have a Wiki. Specify this to disable the Wiki. .PARAMETER AutoInit Specify this to create an initial commit with an empty README. .PARAMETER DisallowSquashMerge By default, squash-merging pull requests will be allowed. Specify this to disallow. .PARAMETER DisallowMergeCommit By default, merging pull requests with a merge commit will be allowed. Specify this to disallow. .PARAMETER DisallowRebaseMerge By default, rebase-merge pull requests will be allowed. Specify this to disallow. .PARAMETER 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. .PARAMETER 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. .EXAMPLE New-GitHubRepository -RepositoryName MyNewRepo -AutoInit .EXAMPLE New-GitHubRepository -RepositoryName MyNewRepo -Organization MyOrg -DisallowRebaseMerge #> [CmdletBinding(SupportsShouldProcess)] [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSShouldProcess", "", Justification="Methods called within here make use of PSShouldProcess, and the switch is passed on to them inherently.")] param( [Parameter(Mandatory)] [ValidateNotNullOrEmpty()] [string] $RepositoryName, [string] $OrganizationName, [string] $Description, [string] $Homepage, [string] $GitIgnoreTemplate, [string] $LicenseTemplate, [int64] $TeamId, [switch] $Private, [switch] $NoIssues, [switch] $NoProjects, [switch] $NoWiki, [switch] $AutoInit, [switch] $DisallowSquashMerge, [switch] $DisallowMergeCommit, [switch] $DisallowRebaseMerge, [string] $AccessToken, [switch] $NoStatus ) Write-InvocationLog -Invocation $MyInvocation $telemetryProperties = @{ 'RepositoryName' = (Get-PiiSafeString -PlainText $RepositoryName) } $uriFragment = 'user/repos' if ($PSBoundParameters.ContainsKey('OrganizationName') -and (-not [String]::IsNullOrEmpty($OrganizationName))) { $telemetryProperties['OrganizationName'] = Get-PiiSafeString -PlainText $OrganizationName $uriFragment = "orgs/$OrganizationName/repos" } if ($PSBoundParameters.ContainsKey('TeamId') -and (-not $PSBoundParameters.Contains('OrganizationName'))) { $message = 'TeamId may only be specified when creating a repository under an organization.' Write-Log -Message $message -Level Error throw $message } $hashBody = @{ 'name' = $RepositoryName } if ($PSBoundParameters.ContainsKey('Description')) { $hashBody['description'] = $Description } if ($PSBoundParameters.ContainsKey('Homepage')) { $hashBody['homepage'] = $Homepage } if ($PSBoundParameters.ContainsKey('GitIgnoreTemplate')) { $hashBody['gitignore_template'] = $GitIgnoreTemplate } if ($PSBoundParameters.ContainsKey('LicenseTemplate')) { $hashBody['license_template'] = $LicenseTemplate } if ($PSBoundParameters.ContainsKey('TeamId')) { $hashBody['team_id'] = $TeamId } if ($PSBoundParameters.ContainsKey('Private')) { $hashBody['private'] = $Private.ToBool() } if ($PSBoundParameters.ContainsKey('NoIssues')) { $hashBody['has_issues'] = (-not $NoIssues.ToBool()) } if ($PSBoundParameters.ContainsKey('NoProjects')) { $hashBody['has_projects'] = (-not $NoProjects.ToBool()) } if ($PSBoundParameters.ContainsKey('NoWiki')) { $hashBody['has_wiki'] = (-not $NoWiki.ToBool()) } if ($PSBoundParameters.ContainsKey('AutoInit')) { $hashBody['auto_init'] = $AutoInit.ToBool() } if ($PSBoundParameters.ContainsKey('DisallowSquashMerge')) { $hashBody['allow_squash_merge'] = (-not $DisallowSquashMerge.ToBool()) } if ($PSBoundParameters.ContainsKey('DisallowMergeCommit')) { $hashBody['allow_merge_commit'] = (-not $DisallowMergeCommit.ToBool()) } if ($PSBoundParameters.ContainsKey('DisallowRebaseMerge')) { $hashBody['allow_rebase_merge'] = (-not $DisallowRebaseMerge.ToBool()) } $params = @{ 'UriFragment' = $uriFragment 'Body' = (ConvertTo-Json -InputObject $hashBody) 'Method' = 'Post' 'Description' = "Creating $RepositoryName" 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -BoundParameters $PSBoundParameters -Name NoStatus -ConfigValueName DefaultNoStatus) } return Invoke-GHRestMethod @params } function Remove-GitHubRepository { <# .SYNOPSIS Removes/deletes a repository from GitHub. .DESCRIPTION Removes/deletes a repository from GitHub. The Git repo for this module can be found here: http://aka.ms/PowerShellForGitHub .PARAMETER OwnerName Owner of the repository. If not supplied here, the DefaultOwnerName configuration property value will be used. .PARAMETER RepositoryName Name of the repository. If not supplied here, the DefaultRepositoryName configuration property value will be used. .PARAMETER Uri Uri for the repository. The OwnerName and RepositoryName will be extracted from here instead of needing to provide them individually. .PARAMETER 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. .PARAMETER 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. .EXAMPLE Remove-GitHubRepository -OwnerName You -RepositoryName YourRepoToDelete .EXAMPLE Remove-GitHubRepository -Uri https://github.com/You/YourRepoToDelete #> [CmdletBinding( SupportsShouldProcess, DefaultParametersetName='Elements')] [Alias('Delete-GitHubRepository')] [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSShouldProcess", "", Justification="Methods called within here make use of PSShouldProcess, and the switch is passed on to them inherently.")] param( [Parameter(ParameterSetName='Elements')] [string] $OwnerName, [Parameter(ParameterSetName='Elements')] [string] $RepositoryName, [Parameter( Mandatory, ParameterSetName='Uri')] [string] $Uri, [string] $AccessToken, [switch] $NoStatus ) Write-InvocationLog -Invocation $MyInvocation $elements = Resolve-RepositoryElements -BoundParameters $PSBoundParameters $OwnerName = $elements.ownerName $RepositoryName = $elements.repositoryName $telemetryProperties = @{ 'OwnerName' = (Get-PiiSafeString -PlainText $OwnerName) 'RepositoryName' = (Get-PiiSafeString -PlainText $RepositoryName) } $params = @{ 'UriFragment' = "repos/$OwnerName/$RepositoryName" 'Method' = 'Delete' 'Description' = "Deleting $RepositoryName" 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -BoundParameters $PSBoundParameters -Name NoStatus -ConfigValueName DefaultNoStatus) } return Invoke-GHRestMethod @params } function Get-GitHubRepository { <# .SYNOPSIS Retrieves information about a repository or list of repositories on GitHub. .DESCRIPTION Retrieves information about a repository or list of repositories on GitHub. The Git repo for this module can be found here: http://aka.ms/PowerShellForGitHub .PARAMETER OwnerName Owner of the repository. If not supplied here, the DefaultOwnerName configuration property value will be used. .PARAMETER RepositoryName Name of the repository. If not supplied here, the DefaultRepositoryName configuration property value will be used. .PARAMETER Uri Uri for the repository. The OwnerName and RepositoryName will be extracted from here instead of needing to provide them individually. .PARAMETER OrganizationName The name of the organization to retrieve the repositories for. .PARAMETER Visibility The type of visibility/accessibility for the repositories to return. .PARAMETER Affiliation Can be one or more of: owner - Repositories that are owned by the authenticated user collaborator - Repositories that the user has been added to as a collaborator organization_member - Repositories that the user has access to through being a member of an organization. This includes every repository on every team that the user is on. .PARAMETER Type The type of repository to return. .PARAMETER Sort Property that the results should be sorted by .PARAMETER Direction Direction of the sort that is to be applied to the results. .PARAMETER GetAllPublicRepositories If this is specified with no other parameter, then instead of returning back all repositories for the current authenticated user, it will instead return back all public repositories on GitHub. .PARAMETER 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. .PARAMETER 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. .EXAMPLE Get-GitHubRepository Gets all repositories for the current authenticated user. .EXAMPLE Get-GitHubRepository -GetAllPublicRepositories Gets all public repositories on GitHub. .EXAMPLE Get-GitHubRepository -OctoCat OctoCat .EXAMPLE Get-GitHubRepository -Uri https://github.com/PowerShell/PowerShellForGitHub .EXAMPLE Get-GitHubRepository -OrganizationName PowerShell #> [CmdletBinding( SupportsShouldProcess, DefaultParametersetName='Elements')] [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSShouldProcess", "", Justification="Methods called within here make use of PSShouldProcess, and the switch is passed on to them inherently.")] param( [Parameter(ParameterSetName='Elements')] [string] $OwnerName, [Parameter(ParameterSetName='Elements')] [string] $RepositoryName, [Parameter( Mandatory, ParameterSetName='Uri')] [string] $Uri, [Parameter(ParameterSetName='Organization')] [string] $OrganizationName, [ValidateSet('All', 'Public', 'Private')] [string] $Visibility, [string[]] $Affiliation, [ValidateSet('All', 'Owner', 'Public', 'Private', 'Member', 'Forks', 'Sources')] [string] $Type, [ValidateSet('Created', 'Updated', 'Pushed', 'FullName')] [string] $Sort, [ValidateSet('Ascending', 'Descending')] [string] $Direction, [switch] $GetAllPublicRepositories, [string] $AccessToken, [switch] $NoStatus ) Write-InvocationLog -Invocation $MyInvocation $elements = Resolve-RepositoryElements -BoundParameters $PSBoundParameters -DisableValidation $OwnerName = $elements.ownerName $RepositoryName = $elements.repositoryName $telemetryProperties = @{} $uriFragment = [String]::Empty $description = [String]::Empty if ((-not [String]::IsNullOrEmpty($OwnerName)) -and (-not [String]::IsNullOrEmpty($RepositoryName))) { $telemetryProperties['OwnerName'] = Get-PiiSafeString -PlainText $OwnerName $telemetryProperties['RepositoryName'] = Get-PiiSafeString -PlainText $RepositoryName $uriFragment = "repos/$OwnerName/$RepositoryName" $description = "Getting repo $RepositoryName" } elseif ([String]::IsNullOrEmpty($OwnerName) -and [String]::IsNullOrEmpty($OrganizationName)) { $uriFragment = 'user/repos' $description = 'Getting repos for current authenticated user' } elseif ([String]::IsNullOrEmpty($OwnerName)) { $telemetryProperties['OrganizationName'] = Get-PiiSafeString -PlainText $OrganizationName $uriFragment = "orgs/$OrganizationName/repos" $description = "Getting repos for $OrganizationName" } else { $telemetryProperties['OwnerName'] = Get-PiiSafeString -PlainText $OwnerName $uriFragment = "users/$OwnerName/repos" $description = "Getting repos for $OwnerName" } $sortConverter = @{ 'Created' = 'created' 'Updated' = 'updated' 'Pushed' = 'pushed' 'FullName' = 'full_name' } $directionConverter = @{ 'Ascending' = 'asc' 'Descending' = 'desc' } $getParams = @() if ($PSBoundParameters.ContainsKey('Visibility')) { $getParams += "visibility=$($Visibility.ToLower())" } if ($PSBoundParameters.ContainsKey('Sort')) { $getParams += "sort=$($sortConverter[$Sort])" } if ($PSBoundParameters.ContainsKey('Type')) { $getParams += "type=$($Type.ToLower())" } if ($PSBoundParameters.ContainsKey('Direction')) { $getParams += "direction=$($directionConverter[$Direction])" } if ($PSBoundParameters.ContainsKey('Affiliation') -and $Affiliation.Count -gt 0) { $getParams += "affiliation=$($Affiliation -join ',')" } $params = @{ 'UriFragment' = $uriFragment + '?' + ($getParams -join '&') 'Description' = $description 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -BoundParameters $PSBoundParameters -Name NoStatus -ConfigValueName DefaultNoStatus) } return Invoke-GHRestMethodMultipleResult @params } function Update-GitHubRepository { <# .SYNOPSIS Updates the details of an existing repository on GitHub. .DESCRIPTION Updates the details of an existing repository on GitHub. The Git repo for this module can be found here: http://aka.ms/PowerShellForGitHub .PARAMETER OwnerName Owner of the repository. If not supplied here, the DefaultOwnerName configuration property value will be used. .PARAMETER RepositoryName Name of the repository. If not supplied here, the DefaultRepositoryName configuration property value will be used. .PARAMETER Uri Uri for the repository. The OwnerName and RepositoryName will be extracted from here instead of needing to provide them individually. .PARAMETER Description A short description of the repository. .PARAMETER Homepage A URL with more information about the repository. .PARAMETER DefaultBranch Update the default branch for this repository. .PARAMETER Private Specify this to make the repository repository. Creating private repositories requires a paid GitHub account. To change a repository to be public, specify -Private:$false .PARAMETER NoIssues By default, this repository will support Issues. Specify this to disable Issues. .PARAMETER 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. .PARAMETER NoWiki By default, this repository will have a Wiki. Specify this to disable the Wiki. .PARAMETER DisallowSquashMerge By default, squash-merging pull requests will be allowed. Specify this to disallow. .PARAMETER DisallowMergeCommit By default, merging pull requests with a merge commit will be allowed. Specify this to disallow. .PARAMETER DisallowRebaseMerge By default, rebase-merge pull requests will be allowed. Specify this to disallow. .PARAMETER Archived Specify this to archive this repository. NOTE: You cannot unarchive repositories through the API / this module. .PARAMETER 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. .PARAMETER 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. .EXAMPLE Update-GitHubRepository -OwnerName Microsoft -RepositoryName PowerShellForGitHub -Description 'The best way to automate your GitHub interactions' .EXAMPLE Update-GitHubRepository -Uri https://github.com/PowerShell/PowerShellForGitHub -Private:$false #> [CmdletBinding( SupportsShouldProcess, DefaultParametersetName='Elements')] [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSShouldProcess", "", Justification="Methods called within here make use of PSShouldProcess, and the switch is passed on to them inherently.")] param( [Parameter(ParameterSetName='Elements')] [string] $OwnerName, [Parameter(ParameterSetName='Elements')] [string] $RepositoryName, [Parameter( Mandatory, ParameterSetName='Uri')] [string] $Uri, [string] $Description, [string] $Homepage, [string] $DefaultBranch, [switch] $Private, [switch] $NoIssues, [switch] $NoProjects, [switch] $NoWiki, [switch] $DisallowSquashMerge, [switch] $DisallowMergeCommit, [switch] $DisallowRebaseMerge, [switch] $Archived, [string] $AccessToken, [switch] $NoStatus ) Write-InvocationLog -Invocation $MyInvocation $elements = Resolve-RepositoryElements -BoundParameters $PSBoundParameters $OwnerName = $elements.ownerName $RepositoryName = $elements.repositoryName $telemetryProperties = @{ 'OwnerName' = (Get-PiiSafeString -PlainText $OwnerName) 'RepositoryName' = (Get-PiiSafeString -PlainText $RepositoryName) } $hashBody = @{ 'name' = $RepositoryName } if ($PSBoundParameters.ContainsKey('Description')) { $hashBody['description'] = $Description } if ($PSBoundParameters.ContainsKey('Homepage')) { $hashBody['homepage'] = $Homepage } if ($PSBoundParameters.ContainsKey('DefaultBranch')) { $hashBody['default_branch'] = $DefaultBranch } if ($PSBoundParameters.ContainsKey('Private')) { $hashBody['private'] = $Private.ToBool() } if ($PSBoundParameters.ContainsKey('NoIssues')) { $hashBody['has_issues'] = (-not $NoIssues.ToBool()) } if ($PSBoundParameters.ContainsKey('NoProjects')) { $hashBody['has_projects'] = (-not $NoProjects.ToBool()) } if ($PSBoundParameters.ContainsKey('NoWiki')) { $hashBody['has_wiki'] = (-not $NoWiki.ToBool()) } if ($PSBoundParameters.ContainsKey('DisallowSquashMerge')) { $hashBody['allow_squash_merge'] = (-not $DisallowSquashMerge.ToBool()) } if ($PSBoundParameters.ContainsKey('DisallowMergeCommit')) { $hashBody['allow_merge_commit'] = (-not $DisallowMergeCommit.ToBool()) } if ($PSBoundParameters.ContainsKey('DisallowRebaseMerge')) { $hashBody['allow_rebase_merge'] = (-not $DisallowRebaseMerge.ToBool()) } if ($PSBoundParameters.ContainsKey('Archived')) { $hashBody['archived'] = $Archived.ToBool() } $params = @{ 'UriFragment' = "repos/$OwnerName/$RepositoryName" 'Body' = (ConvertTo-Json -InputObject $hashBody) 'Method' = 'Patch' 'Description' = "Updating $RepositoryName" 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -BoundParameters $PSBoundParameters -Name NoStatus -ConfigValueName DefaultNoStatus) } return Invoke-GHRestMethod @params } function Get-GitHubRepositoryTopic { <# .SYNOPSIS Retrieves information about a repository on GitHub. .DESCRIPTION Retrieves information about a repository on GitHub. The Git repo for this module can be found here: http://aka.ms/PowerShellForGitHub .PARAMETER OwnerName Owner of the repository. If not supplied here, the DefaultOwnerName configuration property value will be used. .PARAMETER RepositoryName Name of the repository. If not supplied here, the DefaultRepositoryName configuration property value will be used. .PARAMETER Uri Uri for the repository. The OwnerName and RepositoryName will be extracted from here instead of needing to provide them individually. .PARAMETER 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. .PARAMETER 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. .EXAMPLE Get-GitHubRepositoryTopic -OwnerName Microsoft -RepositoryName PowerShellForGitHub .EXAMPLE Get-GitHubRepositoryTopic -Uri https://github.com/PowerShell/PowerShellForGitHub #> [CmdletBinding( SupportsShouldProcess, DefaultParametersetName='Elements')] [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSShouldProcess", "", Justification="Methods called within here make use of PSShouldProcess, and the switch is passed on to them inherently.")] param( [Parameter(ParameterSetName='Elements')] [string] $OwnerName, [Parameter(ParameterSetName='Elements')] [string] $RepositoryName, [Parameter( Mandatory, ParameterSetName='Uri')] [string] $Uri, [string] $AccessToken, [switch] $NoStatus ) Write-InvocationLog -Invocation $MyInvocation $elements = Resolve-RepositoryElements -BoundParameters $PSBoundParameters $OwnerName = $elements.ownerName $RepositoryName = $elements.repositoryName $telemetryProperties = @{ 'OwnerName' = (Get-PiiSafeString -PlainText $OwnerName) 'RepositoryName' = (Get-PiiSafeString -PlainText $RepositoryName) } $params = @{ 'UriFragment' = "repos/$OwnerName/$RepositoryName/topics" 'Method' = 'Get' 'Description' = "Getting topics for $RepositoryName" 'AcceptHeader' = 'application/vnd.github.mercy-preview+json' 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -BoundParameters $PSBoundParameters -Name NoStatus -ConfigValueName DefaultNoStatus) } return Invoke-GHRestMethod @params } function Set-GitHubRepositoryTopic { <# .SYNOPSIS Replaces all topics for a repository on GitHub. .DESCRIPTION Replaces all topics for a repository on GitHub. The Git repo for this module can be found here: http://aka.ms/PowerShellForGitHub .PARAMETER OwnerName Owner of the repository. If not supplied here, the DefaultOwnerName configuration property value will be used. .PARAMETER RepositoryName Name of the repository. If not supplied here, the DefaultRepositoryName configuration property value will be used. .PARAMETER Uri Uri for the repository. The OwnerName and RepositoryName will be extracted from here instead of needing to provide them individually. .PARAMETER Name Array of topics to add to the repository. .PARAMETER Clear Specify this to clear all topics from the repository. .PARAMETER 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. .PARAMETER 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. .EXAMPLE Set-GitHubRepositoryTopic -OwnerName Microsoft -RepositoryName PowerShellForGitHub -Clear .EXAMPLE Set-GitHubRepositoryTopic -Uri https://github.com/PowerShell/PowerShellForGitHub -Name ('octocat', 'powershell', 'github') #> [CmdletBinding( SupportsShouldProcess, DefaultParametersetName='ElementsName')] [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSShouldProcess", "", Justification="Methods called within here make use of PSShouldProcess, and the switch is passed on to them inherently.")] param( [Parameter(ParameterSetName='ElementsName')] [Parameter(ParameterSetName='ElementsClear')] [string] $OwnerName, [Parameter(ParameterSetName='ElementsName')] [Parameter(ParameterSetName='ElementsClear')] [string] $RepositoryName, [Parameter( Mandatory, ParameterSetName='UriName')] [Parameter( Mandatory, ParameterSetName='UriClear')] [string] $Uri, [Parameter( Mandatory, ParameterSetName='ElementsName')] [Parameter( Mandatory, ParameterSetName='UriName')] [string[]] $Name, [Parameter( Mandatory, ParameterSetName='ElementsClear')] [Parameter( Mandatory, ParameterSetName='UriClear')] [switch] $Clear, [string] $AccessToken, [switch] $NoStatus ) Write-InvocationLog -Invocation $MyInvocation $elements = Resolve-RepositoryElements -BoundParameters $PSBoundParameters $OwnerName = $elements.ownerName $RepositoryName = $elements.repositoryName $telemetryProperties = @{ 'OwnerName' = (Get-PiiSafeString -PlainText $OwnerName) 'RepositoryName' = (Get-PiiSafeString -PlainText $RepositoryName) 'Clear' = $PSBoundParameters.ContainsKey('Clear') } $description = "Replacing topics in $RepositoryName" if ($Clear) { $description = "Clearing topics in $RepositoryName" } $names = @($Name) $hashBody = @{ 'names' = $names } $params = @{ 'UriFragment' = "repos/$OwnerName/$RepositoryName/topics" 'Body' = (ConvertTo-Json -InputObject $hashBody) 'Method' = 'Put' 'Description' = $description 'AcceptHeader' = 'application/vnd.github.mercy-preview+json' 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -BoundParameters $PSBoundParameters -Name NoStatus -ConfigValueName DefaultNoStatus) } return Invoke-GHRestMethod @params } function Get-GitHubRepositoryContributor { <# .SYNOPSIS Retrieve list of contributors for a given repository. .DESCRIPTION Retrieve list of contributors for a given repository. GitHub identifies contributors by author email address. This groups contribution counts by GitHub user, which includes all associated email addresses. To improve performance, only the first 500 author email addresses in the repository link to GitHub users. The rest will appear as anonymous contributors without associated GitHub user information. The Git repo for this module can be found here: http://aka.ms/PowerShellForGitHub .PARAMETER OwnerName Owner of the repository. If not supplied here, the DefaultOwnerName configuration property value will be used. .PARAMETER RepositoryName Name of the repository. If not supplied here, the DefaultRepositoryName configuration property value will be used. .PARAMETER Uri Uri for the repository. The OwnerName and RepositoryName will be extracted from here instead of needing to provide them individually. .PARAMETER IncludeAnonymousContributors If specified, anonymous contributors will be included in the results. .PARAMETER IncludeStatistics If specified, each result will include statistics for the number of additions, deletions and commit counts, by week (excluding merge commits and empty commits). .PARAMETER 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. .PARAMETER 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. .OUTPUTS [PSCustomObject[]] List of contributors for the repository. .EXAMPLE Get-GitHubRepositoryContributor -OwnerName Microsoft -RepositoryName PowerShellForGitHub .EXAMPLE Get-GitHubRepositoryContributor -Uri 'https://github.com/PowerShell/PowerShellForGitHub' -IncludeStatistics #> [CmdletBinding( SupportsShouldProcess, DefaultParametersetName='Elements')] [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSShouldProcess", "", Justification="Methods called within here make use of PSShouldProcess, and the switch is passed on to them inherently.")] param( [Parameter(ParameterSetName='Elements')] [string] $OwnerName, [Parameter(ParameterSetName='Elements')] [string] $RepositoryName, [Parameter( Mandatory, ParameterSetName='Uri')] [string] $Uri, [switch] $IncludeAnonymousContributors, [switch] $IncludeStatistics, [string] $AccessToken, [switch] $NoStatus ) Write-InvocationLog -Invocation $MyInvocation $elements = Resolve-RepositoryElements -BoundParameters $PSBoundParameters $OwnerName = $elements.ownerName $RepositoryName = $elements.repositoryName $telemetryProperties = @{ 'OwnerName' = (Get-PiiSafeString -PlainText $OwnerName) 'RepositoryName' = (Get-PiiSafeString -PlainText $RepositoryName) 'IncludeAnonymousContributors' = $IncludeAnonymousContributors.ToBool() 'IncludeStatistics' = $IncludeStatistics.ToBool() } $getParams = @() if ($IncludeAnonymousContributors) { $getParams += 'anon=true' } $uriFragment = "repos/$OwnerName/$RepositoryName/contributors" if ($IncludeStatistics) { $uriFragment = "repos/$OwnerName/$RepositoryName/stats/contributors" } $params = @{ 'UriFragment' = $uriFragment + '?' + ($getParams -join '&') 'Description' = "Getting contributors for $RepositoryName" 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -BoundParameters $PSBoundParameters -Name NoStatus -ConfigValueName DefaultNoStatus) } return Invoke-GHRestMethodMultipleResult @params } function Get-GitHubRepositoryCollaborator { <# .SYNOPSIS Retrieve list of contributors for a given repository. .DESCRIPTION Retrieve list of contributors for a given repository. The Git repo for this module can be found here: http://aka.ms/PowerShellForGitHub .PARAMETER OwnerName Owner of the repository. If not supplied here, the DefaultOwnerName configuration property value will be used. .PARAMETER RepositoryName Name of the repository. If not supplied here, the DefaultRepositoryName configuration property value will be used. .PARAMETER Uri Uri for the repository. The OwnerName and RepositoryName will be extracted from here instead of needing to provide them individually. .PARAMETER 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. .PARAMETER 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. .OUTPUTS [PSCustomObject[]] List of collaborators for the repository. .EXAMPLE Get-GitHubRepositoryCollaborator -OwnerName Microsoft -RepositoryName PowerShellForGitHub .EXAMPLE Get-GitHubRepositoryCollaborator -Uri 'https://github.com/PowerShell/PowerShellForGitHub' #> [CmdletBinding( SupportsShouldProcess, DefaultParametersetName='Elements')] [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSShouldProcess", "", Justification="Methods called within here make use of PSShouldProcess, and the switch is passed on to them inherently.")] param( [Parameter(ParameterSetName='Elements')] [string] $OwnerName, [Parameter(ParameterSetName='Elements')] [string] $RepositoryName, [Parameter( Mandatory, ParameterSetName='Uri')] [string] $Uri, [string] $AccessToken, [switch] $NoStatus ) Write-InvocationLog -Invocation $MyInvocation $elements = Resolve-RepositoryElements -BoundParameters $PSBoundParameters $OwnerName = $elements.ownerName $RepositoryName = $elements.repositoryName $telemetryProperties = @{ 'OwnerName' = (Get-PiiSafeString -PlainText $OwnerName) 'RepositoryName' = (Get-PiiSafeString -PlainText $RepositoryName) } $params = @{ 'UriFragment' = "repos/$OwnerName/$RepositoryName/collaborators" 'Description' = "Getting collaborators for $RepositoryName" 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -BoundParameters $PSBoundParameters -Name NoStatus -ConfigValueName DefaultNoStatus) } return Invoke-GHRestMethodMultipleResult @params } function Get-GitHubRepositoryLanguage { <# .SYNOPSIS Retrieves a list of the programming languages used in a repository on GitHub. .DESCRIPTION Retrieves a list of the programming languages used in a repository on GitHub. The Git repo for this module can be found here: http://aka.ms/PowerShellForGitHub .PARAMETER OwnerName Owner of the repository. If not supplied here, the DefaultOwnerName configuration property value will be used. .PARAMETER RepositoryName Name of the repository. If not supplied here, the DefaultRepositoryName configuration property value will be used. .PARAMETER Uri Uri for the repository. The OwnerName and RepositoryName will be extracted from here instead of needing to provide them individually. .PARAMETER 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. .PARAMETER 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. .OUTPUTS [PSCustomObject[]] List of languages for the specified repository. The value shown for each language is the number of bytes of code written in that language. .EXAMPLE Get-GitHubRepositoryLanguage -OwnerName Microsoft -RepositoryName PowerShellForGitHub .EXAMPLE Get-GitHubRepositoryLanguage -Uri https://github.com/PowerShell/PowerShellForGitHub #> [CmdletBinding( SupportsShouldProcess, DefaultParametersetName='Elements')] [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSShouldProcess", "", Justification="Methods called within here make use of PSShouldProcess, and the switch is passed on to them inherently.")] param( [Parameter(ParameterSetName='Elements')] [string] $OwnerName, [Parameter(ParameterSetName='Elements')] [string] $RepositoryName, [Parameter( Mandatory, ParameterSetName='Uri')] [string] $Uri, [string] $AccessToken, [switch] $NoStatus ) Write-InvocationLog -Invocation $MyInvocation $elements = Resolve-RepositoryElements -BoundParameters $PSBoundParameters $OwnerName = $elements.ownerName $RepositoryName = $elements.repositoryName $telemetryProperties = @{ 'OwnerName' = (Get-PiiSafeString -PlainText $OwnerName) 'RepositoryName' = (Get-PiiSafeString -PlainText $RepositoryName) } $params = @{ 'UriFragment' = "repos/$OwnerName/$RepositoryName/languages" 'Description' = "Getting languages for $RepositoryName" 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -BoundParameters $PSBoundParameters -Name NoStatus -ConfigValueName DefaultNoStatus) } return Invoke-GHRestMethodMultipleResult @params } function Get-GitHubRepositoryTag { <# .SYNOPSIS Retrieves tags for a repository on GitHub. .DESCRIPTION Retrieves tags for a repository on GitHub. The Git repo for this module can be found here: http://aka.ms/PowerShellForGitHub .PARAMETER OwnerName Owner of the repository. If not supplied here, the DefaultOwnerName configuration property value will be used. .PARAMETER RepositoryName Name of the repository. If not supplied here, the DefaultRepositoryName configuration property value will be used. .PARAMETER Uri Uri for the repository. The OwnerName and RepositoryName will be extracted from here instead of needing to provide them individually. .PARAMETER 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. .PARAMETER 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. .EXAMPLE Get-GitHubRepositoryTag -OwnerName Microsoft -RepositoryName PowerShellForGitHub .EXAMPLE Get-GitHubRepositoryTag -Uri https://github.com/PowerShell/PowerShellForGitHub #> [CmdletBinding( SupportsShouldProcess, DefaultParametersetName='Elements')] [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSShouldProcess", "", Justification="Methods called within here make use of PSShouldProcess, and the switch is passed on to them inherently.")] param( [Parameter(ParameterSetName='Elements')] [string] $OwnerName, [Parameter(ParameterSetName='Elements')] [string] $RepositoryName, [Parameter( Mandatory, ParameterSetName='Uri')] [string] $Uri, [string] $AccessToken, [switch] $NoStatus ) Write-InvocationLog -Invocation $MyInvocation $elements = Resolve-RepositoryElements -BoundParameters $PSBoundParameters $OwnerName = $elements.ownerName $RepositoryName = $elements.repositoryName $telemetryProperties = @{ 'OwnerName' = (Get-PiiSafeString -PlainText $OwnerName) 'RepositoryName' = (Get-PiiSafeString -PlainText $RepositoryName) } $params = @{ 'UriFragment' = "repos/$OwnerName/$RepositoryName/tags" 'Description' = "Getting tags for $RepositoryName" 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -BoundParameters $PSBoundParameters -Name NoStatus -ConfigValueName DefaultNoStatus) } return Invoke-GHRestMethodMultipleResult @params } function Move-GitHubRepositoryOwnership { <# .SYNOPSIS Creates a new repository on GitHub. .DESCRIPTION Creates a new repository on GitHub. The Git repo for this module can be found here: http://aka.ms/PowerShellForGitHub .PARAMETER OwnerName Owner of the repository. If not supplied here, the DefaultOwnerName configuration property value will be used. .PARAMETER RepositoryName Name of the repository. If not supplied here, the DefaultRepositoryName configuration property value will be used. .PARAMETER Uri Uri for the repository. The OwnerName and RepositoryName will be extracted from here instead of needing to provide them individually. .PARAMETER NewOwnerName The username or organization name the repository will be transferred to. .PARAMETER TeamId ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories. .PARAMETER 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. .PARAMETER 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. .EXAMPLE Move-GitHubRepositoryOwnership -OwnerName Microsoft -RepositoryName PowerShellForGitHub -NewOwnerName OctoCat #> [CmdletBinding( SupportsShouldProcess, DefaultParametersetName='Elements')] [Alias('Transfer-GitHubRepositoryOwnership')] [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSShouldProcess", "", Justification="Methods called within here make use of PSShouldProcess, and the switch is passed on to them inherently.")] param( [Parameter(ParameterSetName='Elements')] [string] $OwnerName, [Parameter(ParameterSetName='Elements')] [string] $RepositoryName, [Parameter( Mandatory, ParameterSetName='Uri')] [string] $Uri, [Parameter(Mandatory)] [ValidateNotNullOrEmpty()] [string] $NewOwnerName, [int64[]] $TeamId, [string] $AccessToken, [switch] $NoStatus ) Write-InvocationLog -Invocation $MyInvocation $elements = Resolve-RepositoryElements -BoundParameters $PSBoundParameters $OwnerName = $elements.ownerName $RepositoryName = $elements.repositoryName $telemetryProperties = @{ 'OwnerName' = (Get-PiiSafeString -PlainText $OwnerName) 'RepositoryName' = (Get-PiiSafeString -PlainText $RepositoryName) } $hashBody = @{ 'new_owner' = $NewOwnerName } if ($TeamId.Count -gt 0) { $hashBody['team_ids'] = @($TeamId) } $params = @{ 'UriFragment' = "repos/$OwnerName/$RepositoryName/transfer" 'Body' = (ConvertTo-Json -InputObject $hashBody) 'Method' = 'Post' 'Description' = "Transferring ownership of $RepositoryName to $NewOwnerName" 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -BoundParameters $PSBoundParameters -Name NoStatus -ConfigValueName DefaultNoStatus) } return Invoke-GHRestMethod @params } # SIG # Begin signature block # MIIkXwYJKoZIhvcNAQcCoIIkUDCCJEwCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCBPTVjc/i7R6OS1 # 3qbo8DRLIVwCpomH5EtT2MFfRTZgyqCCDYUwggYDMIID66ADAgECAhMzAAABUptA # n1BWmXWIAAAAAAFSMA0GCSqGSIb3DQEBCwUAMH4xCzAJBgNVBAYTAlVTMRMwEQYD # VQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNy # b3NvZnQgQ29ycG9yYXRpb24xKDAmBgNVBAMTH01pY3Jvc29mdCBDb2RlIFNpZ25p # bmcgUENBIDIwMTEwHhcNMTkwNTAyMjEzNzQ2WhcNMjAwNTAyMjEzNzQ2WjB0MQsw # CQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9u # ZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMR4wHAYDVQQDExVNaWNy # b3NvZnQgQ29ycG9yYXRpb24wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB # AQCxp4nT9qfu9O10iJyewYXHlN+WEh79Noor9nhM6enUNbCbhX9vS+8c/3eIVazS # YnVBTqLzW7xWN1bCcItDbsEzKEE2BswSun7J9xCaLwcGHKFr+qWUlz7hh9RcmjYS # kOGNybOfrgj3sm0DStoK8ljwEyUVeRfMHx9E/7Ca/OEq2cXBT3L0f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