Skip to content

Commit dce08d9

Browse files
chore(release): 1.0.4 [skip ci]
## [1.0.4](v1.0.3...v1.0.4) (2021-08-26) ### Bug Fixes * **deps:** bump @actions/core from 1.4.0 to 1.5.0 ([8bf96e7](8bf96e7))
1 parent 8bf96e7 commit dce08d9

File tree

2 files changed

+44
-7
lines changed

2 files changed

+44
-7
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
## [1.0.4](https://github.com/scribd/amazon-appmesh-virtual-node-action/compare/v1.0.3...v1.0.4) (2021-08-26)
2+
3+
4+
### Bug Fixes
5+
6+
* **deps:** bump @actions/core from 1.4.0 to 1.5.0 ([8bf96e7](https://github.com/scribd/amazon-appmesh-virtual-node-action/commit/8bf96e72ec62d6bac80afc1ac6e4bd56149fecf6))
7+
18
## [1.0.3](https://github.com/scribd/amazon-appmesh-virtual-node-action/compare/v1.0.2...v1.0.3) (2021-08-26)
29

310

dist/index.js

Lines changed: 37 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
525525
});
526526
};
527527
Object.defineProperty(exports, "__esModule", ({ value: true }));
528-
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;
528+
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;
529529
const command_1 = __nccwpck_require__(7351);
530530
const file_command_1 = __nccwpck_require__(717);
531531
const utils_1 = __nccwpck_require__(5278);
@@ -703,19 +703,30 @@ exports.debug = debug;
703703
/**
704704
* Adds an error issue
705705
* @param message error issue message. Errors will be converted to string via toString()
706+
* @param properties optional properties to add to the annotation.
706707
*/
707-
function error(message) {
708-
command_1.issue('error', message instanceof Error ? message.toString() : message);
708+
function error(message, properties = {}) {
709+
command_1.issueCommand('error', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message);
709710
}
710711
exports.error = error;
711712
/**
712-
* Adds an warning issue
713+
* Adds a warning issue
713714
* @param message warning issue message. Errors will be converted to string via toString()
715+
* @param properties optional properties to add to the annotation.
714716
*/
715-
function warning(message) {
716-
command_1.issue('warning', message instanceof Error ? message.toString() : message);
717+
function warning(message, properties = {}) {
718+
command_1.issueCommand('warning', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message);
717719
}
718720
exports.warning = warning;
721+
/**
722+
* Adds a notice issue
723+
* @param message notice issue message. Errors will be converted to string via toString()
724+
* @param properties optional properties to add to the annotation.
725+
*/
726+
function notice(message, properties = {}) {
727+
command_1.issueCommand('notice', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message);
728+
}
729+
exports.notice = notice;
719730
/**
720731
* Writes info to log with console.log.
721732
* @param message info message
@@ -849,7 +860,7 @@ exports.issueCommand = issueCommand;
849860
// We use any as a valid input type
850861
/* eslint-disable @typescript-eslint/no-explicit-any */
851862
Object.defineProperty(exports, "__esModule", ({ value: true }));
852-
exports.toCommandValue = void 0;
863+
exports.toCommandProperties = exports.toCommandValue = void 0;
853864
/**
854865
* Sanitizes an input into a string so it can be passed into issueCommand safely
855866
* @param input input to sanitize into a string
@@ -864,6 +875,25 @@ function toCommandValue(input) {
864875
return JSON.stringify(input);
865876
}
866877
exports.toCommandValue = toCommandValue;
878+
/**
879+
*
880+
* @param annotationProperties
881+
* @returns The command properties to send with the actual annotation command
882+
* See IssueCommandProperties: https://github.com/actions/runner/blob/main/src/Runner.Worker/ActionCommandManager.cs#L646
883+
*/
884+
function toCommandProperties(annotationProperties) {
885+
if (!Object.keys(annotationProperties).length) {
886+
return {};
887+
}
888+
return {
889+
title: annotationProperties.title,
890+
line: annotationProperties.startLine,
891+
endLine: annotationProperties.endLine,
892+
col: annotationProperties.startColumn,
893+
endColumn: annotationProperties.endColumn
894+
};
895+
}
896+
exports.toCommandProperties = toCommandProperties;
867897
//# sourceMappingURL=utils.js.map
868898

869899
/***/ }),

0 commit comments

Comments
 (0)