Public/Update-CCReleaseWorkflow.ps1
|
function Update-CCReleaseWorkflow { <# .SYNOPSIS Re-syncs the CodeCompass-managed workflow files to the current templates. .DESCRIPTION Overwrites a managed workflow only if it is unchanged since CodeCompass wrote it; user-edited and 'adopted' workflows are left untouched unless -Force. -PullRequest applies the update via a pull request instead of the working tree. Supports -WhatIf. .EXAMPLE Update-CCReleaseWorkflow -Path . .EXAMPLE Update-CCReleaseWorkflow -Path . -PullRequest #> [CmdletBinding(SupportsShouldProcess)] [OutputType([pscustomobject])] param( [Parameter(Position = 0)] [string]$Path = '.', [switch]$Force, [switch]$Adopt, [switch]$PullRequest, [string]$Branch = 'codecompass/update-release-workflows' ) if ($PullRequest) { return Invoke-CCWorkflowPullRequest -Path $Path -Branch $Branch -Cmdlet $PSCmdlet } Invoke-CCWorkflowSync -Path $Path -Force:$Force -Adopt:$Adopt -Cmdlet $PSCmdlet } |