Skip to content

Commit

Permalink
limit rights
Browse files Browse the repository at this point in the history
  • Loading branch information
tunisiano187 committed Apr 11, 2024
1 parent 620a220 commit 6362dca
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/new-issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ jobs:
- name: Get new package
run: |
Import-Module "${{ github.workspace }}\scripts\new.psm1"
Find-nextissueGH -packageName "${{ github.event.issue.title }}"
Find-nextissueGH -packageName "${{ github.event.issue.title }}" -actor "${{ github.event.issue.user.login }}"
12 changes: 7 additions & 5 deletions scripts/Find-nextissueGH.ps1
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
$ErrorActionPreference = 'Continue'
function Find-nextissueGH {
param(
[Parameter(Mandatory = $true)]
[string]$packageName
[string]$packageName,
[Parameter(Mandatory = $true)]
[string]$actor
)

if($actor -ne 'tunisiano187' -or $title -notmatch 'exclude') {
throw "User $actor cannot run this"
}
$ErrorActionPreference = 'Continue'
Install-Module psgithubsearch -ErrorAction SilentlyContinue -Force
Import-Module psgithubsearch

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

Write-Output "Search the next package to import"
$search = $packageName
if($search) {
Expand Down

0 comments on commit 6362dca

Please sign in to comment.