Skip to content

Commit

Permalink
Replace spaces with dashes for package names
Browse files Browse the repository at this point in the history
  • Loading branch information
AdmiringWorm committed Jun 25, 2020
1 parent 4f028c5 commit 043d627
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions scripts/private/Update-StatusComment.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@

if ($statusData -and $statusData.Count -gt 0) {
$statusData | ForEach-Object {
if ($_.name -match ' ') {
$_.name = ($_.name -replace ' ', '-').ToLowerInvariant()
}
$lowestStatusVersion = $_.versions | Sort-Object {
if ($_.status -eq 'waiting') {
0
Expand Down
6 changes: 5 additions & 1 deletion scripts/public/status-checks/New-IssueStatus.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
return
}

$packageName = $issueData.title -replace "^RF[PM]\s*-\s*(.*)\s*$", "`${1}"
$packageName = ($issueData.title -replace "^RF[PM]\s*-\s*(.*)\s*$", "`${1}" -replace ' ', '-').ToLowerInvariant()

$statusData = @()

Expand Down Expand Up @@ -53,4 +53,8 @@
}

Update-StatusComment @arguments

if ($packageName -ne $issueData) {
Update-Issue @PSBoundParameters -title $packageName
}
}

0 comments on commit 043d627

Please sign in to comment.