Skip to content

Conversation

@rulasg
Copy link
Owner

@rulasg rulasg commented Dec 1, 2023

Fixes #30

@@ -0,0 +1,60 @@
function Add-LabelToRepo{

Check notice

Code scanning / PSScriptAnalyzer

The cmdlet 'Add-LabelToRepo' does not have a help comment.

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.

'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

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.

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.

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.

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.

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

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.

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

Line has trailing whitespace
@rulasg rulasg merged commit 8207917 into main Dec 1, 2023
@rulasg rulasg deleted the rulasg/issue30 branch December 1, 2023 16:33
@rulasg rulasg self-assigned this Dec 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add labels to a repo

2 participants