-
Notifications
You must be signed in to change notification settings - Fork 1
Add labels to a repo #31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Fixes #30
| @@ -0,0 +1,60 @@ | |||
| function Add-LabelToRepo{ | |||
Check notice
Code scanning / PSScriptAnalyzer
The cmdlet 'Add-LabelToRepo' does not have a help comment.
| @@ -0,0 +1,60 @@ | |||
| function Add-LabelToRepo{ | |||
| [CmdletBinding(SupportsShouldProcess)] | |||
Check warning
Code scanning / PSScriptAnalyzer
'Add-LabelToRepo' has the ShouldProcess attribute but does not call ShouldProcess/ShouldContinue.
| $command = $command -replace "{owner}", $Owner | ||
| $command = $command -replace "{repo}", $Repo | ||
|
|
||
|
|
Check notice
Code scanning / PSScriptAnalyzer
Line has trailing whitespace
|
|
||
| $command | Write-MyVerbose | ||
|
|
||
| $result = Invoke-Expression $command |
Check warning
Code scanning / PSScriptAnalyzer
Invoke-Expression is used. Please remove Invoke-Expression from script and find other options instead.
| return $result | ||
| } Export-ModuleMember -Function Add-LabelToRepo | ||
|
|
||
| function Add-WellknownLabelsToRepos{ |
Check notice
Code scanning / PSScriptAnalyzer
The cmdlet 'Add-WellknownLabelsToRepos' does not have a help comment.
| return $result | ||
| } Export-ModuleMember -Function Add-LabelToRepo | ||
|
|
||
| function Add-WellknownLabelsToRepos{ |
Check warning
Code scanning / PSScriptAnalyzer
The cmdlet 'Add-WellknownLabelsToRepos' uses a plural noun. A singular noun should be used instead.
| [CmdletBinding(SupportsShouldProcess)] | ||
| param( | ||
| [Parameter(Mandatory)][string]$Repo, | ||
| [Parameter()][switch]$Update, |
Check warning
Code scanning / PSScriptAnalyzer
The parameter 'Update' has been declared but not used.
| [Parameter()][string]$Owner | ||
| ) | ||
|
|
||
| $env = Get-EnvironmentOwner -Owner $Owner |
Check notice
Code scanning / PSScriptAnalyzer
Line has trailing whitespace
| [Parameter()][string]$Owner | ||
| ) | ||
|
|
||
| $env = Get-EnvironmentOwner -Owner $Owner |
Check warning
Code scanning / PSScriptAnalyzer
The variable 'env' is assigned but never used.
|
|
||
| Add-LabelToRepo -Owner $Owner -Repo $Repo -Name $_.name -Description $_.description -Color $_.color | ||
| } | ||
|
|
Check notice
Code scanning / PSScriptAnalyzer
Line has trailing whitespace
Fixes #30