File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
hugoalh.GitHubActionsToolkit Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -553,6 +553,12 @@ function Write-GHActionsAnnotation {
553
553
[Parameter ()][uint ]$EndColumn ,
554
554
[Parameter ()][ValidatePattern (' ^.*$' )][Alias (' Header' )][string ]$Title
555
555
)
556
+ [string ]$TypeRaw = " "
557
+ switch ($Type.GetHashCode ()) {
558
+ 0 { $TypeRaw = ' notice' ; break }
559
+ 1 { $TypeRaw = ' warning' ; break }
560
+ 2 { $TypeRaw = ' error' ; break }
561
+ }
556
562
[hashtable ]$Property = @ {}
557
563
if ($File.Length -gt 0 ) {
558
564
$Property .' file' = $File
@@ -572,7 +578,7 @@ function Write-GHActionsAnnotation {
572
578
if ($Title.Length -gt 0 ) {
573
579
$Property .' title' = $Title
574
580
}
575
- Write-GHActionsCommand - Command $Type .ToString ().ToLower() - Message $Message - Property $Property
581
+ Write-GHActionsCommand - Command $TypeRaw - Message $Message - Property $Property
576
582
}
577
583
<#
578
584
. SYNOPSIS
You can’t perform that action at this time.
0 commit comments