@@ -1291,7 +1291,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
12911291 } ) ;
12921292} ;
12931293Object . defineProperty ( exports , "__esModule" , ( { value : true } ) ) ;
1294- exports . getState = exports . saveState = exports . group = exports . endGroup = exports . startGroup = exports . info = exports . warning = exports . error = exports . debug = exports . isDebug = exports . setFailed = exports . setCommandEcho = exports . setOutput = exports . getBooleanInput = exports . getMultilineInput = exports . getInput = exports . addPath = exports . setSecret = exports . exportVariable = exports . ExitCode = void 0 ;
1294+ exports . getState = exports . saveState = exports . group = exports . endGroup = exports . startGroup = exports . info = exports . notice = exports . warning = exports . error = exports . debug = exports . isDebug = exports . setFailed = exports . setCommandEcho = exports . setOutput = exports . getBooleanInput = exports . getMultilineInput = exports . getInput = exports . addPath = exports . setSecret = exports . exportVariable = exports . ExitCode = void 0 ;
12951295const command_1 = __nccwpck_require__ ( 241 ) ;
12961296const file_command_1 = __nccwpck_require__ ( 717 ) ;
12971297const utils_1 = __nccwpck_require__ ( 278 ) ;
@@ -1469,19 +1469,30 @@ exports.debug = debug;
14691469/**
14701470 * Adds an error issue
14711471 * @param message error issue message. Errors will be converted to string via toString()
1472+ * @param properties optional properties to add to the annotation.
14721473 */
1473- function error ( message ) {
1474- command_1 . issue ( 'error' , message instanceof Error ? message . toString ( ) : message ) ;
1474+ function error ( message , properties = { } ) {
1475+ command_1 . issueCommand ( 'error' , utils_1 . toCommandProperties ( properties ) , message instanceof Error ? message . toString ( ) : message ) ;
14751476}
14761477exports . error = error ;
14771478/**
1478- * Adds an warning issue
1479+ * Adds a warning issue
14791480 * @param message warning issue message. Errors will be converted to string via toString()
1481+ * @param properties optional properties to add to the annotation.
14801482 */
1481- function warning ( message ) {
1482- command_1 . issue ( 'warning' , message instanceof Error ? message . toString ( ) : message ) ;
1483+ function warning ( message , properties = { } ) {
1484+ command_1 . issueCommand ( 'warning' , utils_1 . toCommandProperties ( properties ) , message instanceof Error ? message . toString ( ) : message ) ;
14831485}
14841486exports . warning = warning ;
1487+ /**
1488+ * Adds a notice issue
1489+ * @param message notice issue message. Errors will be converted to string via toString()
1490+ * @param properties optional properties to add to the annotation.
1491+ */
1492+ function notice ( message , properties = { } ) {
1493+ command_1 . issueCommand ( 'notice' , utils_1 . toCommandProperties ( properties ) , message instanceof Error ? message . toString ( ) : message ) ;
1494+ }
1495+ exports . notice = notice ;
14851496/**
14861497 * Writes info to log with console.log.
14871498 * @param message info message
@@ -1613,7 +1624,7 @@ exports.issueCommand = issueCommand;
16131624// We use any as a valid input type
16141625/* eslint-disable @typescript-eslint/no-explicit-any */
16151626Object . defineProperty ( exports , "__esModule" , ( { value : true } ) ) ;
1616- exports . toCommandValue = void 0 ;
1627+ exports . toCommandProperties = exports . toCommandValue = void 0 ;
16171628/**
16181629 * Sanitizes an input into a string so it can be passed into issueCommand safely
16191630 * @param input input to sanitize into a string
@@ -1628,6 +1639,25 @@ function toCommandValue(input) {
16281639 return JSON . stringify ( input ) ;
16291640}
16301641exports . toCommandValue = toCommandValue ;
1642+ /**
1643+ *
1644+ * @param annotationProperties
1645+ * @returns The command properties to send with the actual annotation command
1646+ * See IssueCommandProperties: https://github.com/actions/runner/blob/main/src/Runner.Worker/ActionCommandManager.cs#L646
1647+ */
1648+ function toCommandProperties ( annotationProperties ) {
1649+ if ( ! Object . keys ( annotationProperties ) . length ) {
1650+ return { } ;
1651+ }
1652+ return {
1653+ title : annotationProperties . title ,
1654+ line : annotationProperties . startLine ,
1655+ endLine : annotationProperties . endLine ,
1656+ col : annotationProperties . startColumn ,
1657+ endColumn : annotationProperties . endColumn
1658+ } ;
1659+ }
1660+ exports . toCommandProperties = toCommandProperties ;
16311661//# sourceMappingURL=utils.js.map
16321662
16331663/***/ } ) ,
@@ -2898,77 +2928,77 @@ function copyFile(srcFile, destFile, force) {
28982928/***/ 357 :
28992929/***/ ( ( module ) => {
29002930
2901- module . exports = require ( "assert" ) ; ;
2931+ module . exports = require ( "assert" ) ;
29022932
29032933/***/ } ) ,
29042934
29052935/***/ 129 :
29062936/***/ ( ( module ) => {
29072937
2908- module . exports = require ( "child_process" ) ; ;
2938+ module . exports = require ( "child_process" ) ;
29092939
29102940/***/ } ) ,
29112941
29122942/***/ 614 :
29132943/***/ ( ( module ) => {
29142944
2915- module . exports = require ( "events" ) ; ;
2945+ module . exports = require ( "events" ) ;
29162946
29172947/***/ } ) ,
29182948
29192949/***/ 747 :
29202950/***/ ( ( module ) => {
29212951
2922- module . exports = require ( "fs" ) ; ;
2952+ module . exports = require ( "fs" ) ;
29232953
29242954/***/ } ) ,
29252955
29262956/***/ 211 :
29272957/***/ ( ( module ) => {
29282958
2929- module . exports = require ( "https" ) ; ;
2959+ module . exports = require ( "https" ) ;
29302960
29312961/***/ } ) ,
29322962
29332963/***/ 87 :
29342964/***/ ( ( module ) => {
29352965
2936- module . exports = require ( "os" ) ; ;
2966+ module . exports = require ( "os" ) ;
29372967
29382968/***/ } ) ,
29392969
29402970/***/ 622 :
29412971/***/ ( ( module ) => {
29422972
2943- module . exports = require ( "path" ) ; ;
2973+ module . exports = require ( "path" ) ;
29442974
29452975/***/ } ) ,
29462976
29472977/***/ 304 :
29482978/***/ ( ( module ) => {
29492979
2950- module . exports = require ( "string_decoder" ) ; ;
2980+ module . exports = require ( "string_decoder" ) ;
29512981
29522982/***/ } ) ,
29532983
29542984/***/ 213 :
29552985/***/ ( ( module ) => {
29562986
2957- module . exports = require ( "timers" ) ; ;
2987+ module . exports = require ( "timers" ) ;
29582988
29592989/***/ } ) ,
29602990
29612991/***/ 835 :
29622992/***/ ( ( module ) => {
29632993
2964- module . exports = require ( "url" ) ; ;
2994+ module . exports = require ( "url" ) ;
29652995
29662996/***/ } ) ,
29672997
29682998/***/ 669 :
29692999/***/ ( ( module ) => {
29703000
2971- module . exports = require ( "util" ) ; ;
3001+ module . exports = require ( "util" ) ;
29723002
29733003/***/ } )
29743004
@@ -3007,7 +3037,9 @@ module.exports = require("util");;
30073037/************************************************************************/
30083038/******/ /* webpack/runtime/compat */
30093039/******/
3010- /******/ if ( typeof __nccwpck_require__ !== 'undefined' ) __nccwpck_require__ . ab = __dirname + "/" ; /************************************************************************/
3040+ /******/ if ( typeof __nccwpck_require__ !== 'undefined' ) __nccwpck_require__ . ab = __dirname + "/" ;
3041+ /******/
3042+ /************************************************************************/
30113043/******/
30123044/******/ // startup
30133045/******/ // Load entry module and return exports
0 commit comments