Skip to content

Commit

Permalink
fix: message for orphaned modules in workflow issues was showing the …
Browse files Browse the repository at this point in the history
…wrong module name (#2904)

message for orphaned modules in workflow issues was showing the wrong
module name
  • Loading branch information
rahalan authored Aug 1, 2024
1 parent 294af38 commit 8490793
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ function Set-AvmGithubIssueForWorkflow {
if ($workflowRun.conclusion -eq 'failure') {
$issueName = "[Failed pipeline] $($workflowRun.workflowName)"
$failedrun = "Failed run: $($workflowRun.url)"
$moduleName = $workflowRun.workflowName.Replace('.', '/')

if ($issues.title -notcontains $issueName) {
if ($PSCmdlet.ShouldProcess("Issue [$issueName]", 'Create')) {
Expand All @@ -100,7 +101,6 @@ function Set-AvmGithubIssueForWorkflow {
"@

if ($workflowRun.workflowName -match 'avm.(?:res|ptn)') {
$moduleName = $workflowRun.workflowName.Replace('.', '/')
$moduleIndex = $moduleName.StartsWith('avm/res') ? 'Bicep-Resource' : 'Bicep-Pattern'
# get CSV data
$module = Get-AvmCsvData -ModuleIndex $moduleIndex | Where-Object ModuleName -EQ $moduleName
Expand Down

0 comments on commit 8490793

Please sign in to comment.