Skip to content

Commit ee0c9f4

Browse files
chore(release): 1.0.3 [skip ci]
## [1.0.3](v1.0.2...v1.0.3) (2021-08-26) ### Bug Fixes * **deps:** bump @actions/core from 1.4.0 to 1.5.0 ([cc94620](cc94620))
1 parent cc94620 commit ee0c9f4

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.3](https://github.com/scribd/amazon-appmesh-virtual-gateway-route-action/compare/v1.0.2...v1.0.3) (2021-08-26)
2+
3+
4+
### Bug Fixes
5+
6+
* **deps:** bump @actions/core from 1.4.0 to 1.5.0 ([cc94620](https://github.com/scribd/amazon-appmesh-virtual-gateway-route-action/commit/cc946209faaafe9304edfa30e95f8e5647d9b129))
7+
18
## [1.0.2](https://github.com/scribd/amazon-appmesh-virtual-gateway-route-action/compare/v1.0.1...v1.0.2) (2021-08-26)
29

310

dist/index.js

Lines changed: 37 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
526526
});
527527
};
528528
Object.defineProperty(exports, "__esModule", ({ value: true }));
529-
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;
529+
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;
530530
const command_1 = __nccwpck_require__(7351);
531531
const file_command_1 = __nccwpck_require__(717);
532532
const utils_1 = __nccwpck_require__(5278);
@@ -704,19 +704,30 @@ exports.debug = debug;
704704
/**
705705
* Adds an error issue
706706
* @param message error issue message. Errors will be converted to string via toString()
707+
* @param properties optional properties to add to the annotation.
707708
*/
708-
function error(message) {
709-
command_1.issue('error', message instanceof Error ? message.toString() : message);
709+
function error(message, properties = {}) {
710+
command_1.issueCommand('error', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message);
710711
}
711712
exports.error = error;
712713
/**
713-
* Adds an warning issue
714+
* Adds a warning issue
714715
* @param message warning issue message. Errors will be converted to string via toString()
716+
* @param properties optional properties to add to the annotation.
715717
*/
716-
function warning(message) {
717-
command_1.issue('warning', message instanceof Error ? message.toString() : message);
718+
function warning(message, properties = {}) {
719+
command_1.issueCommand('warning', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message);
718720
}
719721
exports.warning = warning;
722+
/**
723+
* Adds a notice issue
724+
* @param message notice issue message. Errors will be converted to string via toString()
725+
* @param properties optional properties to add to the annotation.
726+
*/
727+
function notice(message, properties = {}) {
728+
command_1.issueCommand('notice', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message);
729+
}
730+
exports.notice = notice;
720731
/**
721732
* Writes info to log with console.log.
722733
* @param message info message
@@ -850,7 +861,7 @@ exports.issueCommand = issueCommand;
850861
// We use any as a valid input type
851862
/* eslint-disable @typescript-eslint/no-explicit-any */
852863
Object.defineProperty(exports, "__esModule", ({ value: true }));
853-
exports.toCommandValue = void 0;
864+
exports.toCommandProperties = exports.toCommandValue = void 0;
854865
/**
855866
* Sanitizes an input into a string so it can be passed into issueCommand safely
856867
* @param input input to sanitize into a string
@@ -865,6 +876,25 @@ function toCommandValue(input) {
865876
return JSON.stringify(input);
866877
}
867878
exports.toCommandValue = toCommandValue;
879+
/**
880+
*
881+
* @param annotationProperties
882+
* @returns The command properties to send with the actual annotation command
883+
* See IssueCommandProperties: https://github.com/actions/runner/blob/main/src/Runner.Worker/ActionCommandManager.cs#L646
884+
*/
885+
function toCommandProperties(annotationProperties) {
886+
if (!Object.keys(annotationProperties).length) {
887+
return {};
888+
}
889+
return {
890+
title: annotationProperties.title,
891+
line: annotationProperties.startLine,
892+
endLine: annotationProperties.endLine,
893+
col: annotationProperties.startColumn,
894+
endColumn: annotationProperties.endColumn
895+
};
896+
}
897+
exports.toCommandProperties = toCommandProperties;
868898
//# sourceMappingURL=utils.js.map
869899

870900
/***/ }),

0 commit comments

Comments
 (0)