Add helpers to log a GitHub "notice" (#8268)
Co-authored-by: Mike Harder <mharder@microsoft.com>
This commit is contained in:
Родитель
97fc7ea453
Коммит
a2a6e9119f
|
@ -10,6 +10,26 @@ function LogInfo {
|
|||
Write-Host "$args"
|
||||
}
|
||||
|
||||
function LogNotice {
|
||||
if (Test-SupportsGitHubLogging) {
|
||||
Write-Host ("::notice::$args" -replace "`n", "%0D%0A")
|
||||
}
|
||||
else {
|
||||
# No equivalent for DevOps
|
||||
Write-Host "[Notice] $args"
|
||||
}
|
||||
}
|
||||
|
||||
function LogNoticeForFile($file, $noticeString) {
|
||||
if (Test-SupportsGitHubLogging) {
|
||||
Write-Host ("::notice file=$file,line=1,col=1::$noticeString" -replace "`n", "%0D%0A")
|
||||
}
|
||||
else {
|
||||
# No equivalent for DevOps
|
||||
Write-Host "[Notice in file $file] $noticeString"
|
||||
}
|
||||
}
|
||||
|
||||
function LogWarning {
|
||||
if (Test-SupportsDevOpsLogging) {
|
||||
Write-Host ("##vso[task.LogIssue type=warning;]$args" -replace "`n", "%0D%0A")
|
||||
|
|
Загрузка…
Ссылка в новой задаче