@@ -34,15 +34,9 @@ function Remove-GitHubAccelerator {
3434
3535 . PARAMETER RunnerGroupNamePatterns
3636 An array of regex patterns to match against runner group names. Runner groups matching any of
37- these patterns will be deleted. If empty, no runner groups will be deleted. Requires the
38- -IncludeRunnerGroups switch to be specified.
37+ these patterns will be deleted. If empty, no runner groups will be deleted.
3938 Default: Empty array (no runner groups deleted)
4039
41- . PARAMETER IncludeRunnerGroups
42- A switch parameter that enables deletion of runner groups matching the patterns specified in
43- -RunnerGroupNamePatterns. By default, runner groups are not deleted.
44- Default: $false (do not delete runner groups)
45-
4640 . PARAMETER BypassConfirmation
4741 A switch parameter that bypasses the interactive confirmation prompts. When specified, the function
4842 waits for the duration specified in -BypassConfirmationTimeoutSeconds before proceeding, allowing
@@ -80,7 +74,7 @@ function Remove-GitHubAccelerator {
8074 Deletes all repositories and teams matching the pattern "^alz-.*" from the "my-org" organization.
8175
8276 . EXAMPLE
83- Remove-GitHubAccelerator -GitHubOrganization "my-org" -RepositoryNamePatterns @("^alz-.*", "^landing-zone-.*") -IncludeRunnerGroups - RunnerGroupNamePatterns @("^alz-.*")
77+ Remove-GitHubAccelerator -GitHubOrganization "my-org" -RepositoryNamePatterns @("^alz-.*", "^landing-zone-.*") -RunnerGroupNamePatterns @("^alz-.*")
8478
8579 Deletes repositories matching either pattern and runner groups matching "^alz-.*" from the
8680 "my-org" organization.
@@ -117,9 +111,6 @@ function Remove-GitHubAccelerator {
117111 [Alias (" runners" )]
118112 [string []]$RunnerGroupNamePatterns = @ (),
119113
120- [Parameter (Mandatory = $false , HelpMessage = " [OPTIONAL] Include runner groups in the deletion process." )]
121- [switch ]$IncludeRunnerGroups ,
122-
123114 [Parameter (Mandatory = $false , HelpMessage = " [OPTIONAL] Bypass interactive confirmation prompts." )]
124115 [switch ]$BypassConfirmation ,
125116
@@ -171,7 +162,7 @@ function Remove-GitHubAccelerator {
171162
172163 $hasRepositoryPatterns = $RepositoryNamePatterns.Count -gt 0
173164 $hasTeamPatterns = $TeamNamePatterns.Count -gt 0
174- $hasRunnerGroupPatterns = $IncludeRunnerGroups -and $ RunnerGroupNamePatterns.Count -gt 0
165+ $hasRunnerGroupPatterns = $RunnerGroupNamePatterns.Count -gt 0
175166
176167 if (-not $hasRepositoryPatterns -and -not $hasTeamPatterns -and -not $hasRunnerGroupPatterns ) {
177168 Write-ToConsoleLog " No patterns provided for repositories, teams, or runner groups. Nothing to do. Exiting..." - IsError
0 commit comments