Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
tunisiano187 committed Mar 29, 2024
1 parent a251ce0 commit 2a19c50
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions scripts/Exclude-package.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,20 @@ function Exclude-Package {
[Parameter(Mandatory = $true)]
[string]$title,
[Parameter(Mandatory = $false)]
[string]$repository
[string]$Repository
)

Write-Output "Repository : $Repository"

Install-Module psgithubsearch -ErrorAction SilentlyContinue
Import-Module psgithubsearch
if(!(Test-Path Env:github_api_key)) {
$Env:github_api_key = $Github_personal_token #Github personal access token
}
[string]$Owner = "tunisiano187"
[string]$Repository = "Chocolatey-packages"

Write-Output "number : $issueNumber"
Write-Output "Repository : $repository"
Write-Output "Title : $title"
$extract = $title.Split('(')[1].split(')')[0]
Write-Output "Extract : $extract"
Expand All @@ -29,6 +39,6 @@ function Exclude-Package {
Remove-Item -Path $folder -Recurse -Force -ErrorAction Continue
Remove-Item -Path "../icons/$extract.*" -ErrorAction Continue
}
Update-GitHubIssue -OwnerName tunisiano187 -RepositoryName chocolatey-packages -Issue $issueNumber -State Closed
Update-GitHubIssue -OwnerName $Owner -RepositoryName $repository -Issue $issueNumber -State Closed
}
}

0 comments on commit 2a19c50

Please sign in to comment.