Skip to content

Commit

Permalink
Test GH
Browse files Browse the repository at this point in the history
  • Loading branch information
tunisiano187 committed Apr 11, 2024
1 parent 17d23c6 commit 2e5bb90
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/new-issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ jobs:
- uses: actions/[email protected]
- name: Check exception
run: |
. "${{ github.workspace }}\scripts\Find-nextissue.ps1"
. "${{ github.workspace }}\scripts\Find-nextissueGH.ps1" -packageName ${{ github.event.issue.title }}
30 changes: 30 additions & 0 deletions scripts/Find-nextissueGH.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
$ErrorActionPreference = 'Continue'
param(
[Parameter(Mandatory = $true)]
[string]$packageName
)

Install-Module psgithubsearch -ErrorAction SilentlyContinue
Import-Module psgithubsearch

[string]$Owner = "tunisiano187"
[string]$Repository = "Chocolatey-packages"

Write-Output "Search the next package to import"
$search = $packageName
if($search) {
$folder = Join-Path $PSScriptRoot "../automatic/$search"
if(Test-Path $folder) {
Write-Warning "Package already in the folder, the package $search needs to be finished and the issue closed"
} elseif ($search -ne '') {
$script = Join-Path $PSScriptRoot "Get-Package.ps1"
. $script $search.Tolower()
}
}

try {
git push origin master
}
catch {
"Nothing to push!"
}

0 comments on commit 2e5bb90

Please sign in to comment.